All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: vsp1: Fix an error handling path in the probe function
@ 2020-12-12 17:41 ` Christophe JAILLET
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe JAILLET @ 2020-12-12 17:41 UTC (permalink / raw)
  To: laurent.pinchart, kieran.bingham+renesas, mchehab
  Cc: linux-media, linux-renesas-soc, linux-kernel, kernel-janitors,
	Christophe JAILLET

A previous 'rcar_fcp_get()' call must be undone in the error handling path,
as already done in the remove function.

Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/media/platform/vsp1/vsp1_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index dc62533cf32c..aa66e4f5f3f3 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev)
 	}
 
 done:
-	if (ret)
+	if (ret) {
 		pm_runtime_disable(&pdev->dev);
+		rcar_fcp_put(vsp1->fcp);
+	}
 
 	return ret;
 }
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] media: vsp1: Fix an error handling path in the probe function
@ 2020-12-12 17:41 ` Christophe JAILLET
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe JAILLET @ 2020-12-12 17:41 UTC (permalink / raw)
  To: laurent.pinchart, kieran.bingham+renesas, mchehab
  Cc: linux-media, linux-renesas-soc, linux-kernel, kernel-janitors,
	Christophe JAILLET

A previous 'rcar_fcp_get()' call must be undone in the error handling path,
as already done in the remove function.

Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/media/platform/vsp1/vsp1_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index dc62533cf32c..aa66e4f5f3f3 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev)
 	}
 
 done:
-	if (ret)
+	if (ret) {
 		pm_runtime_disable(&pdev->dev);
+		rcar_fcp_put(vsp1->fcp);
+	}
 
 	return ret;
 }
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: vsp1: Fix an error handling path in the probe function
  2020-12-12 17:41 ` Christophe JAILLET
@ 2020-12-14  7:31   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-12-14  7:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Laurent Pinchart, Kieran Bingham, Mauro Carvalho Chehab,
	Linux Media Mailing List, Linux-Renesas,
	Linux Kernel Mailing List, kernel-janitors

On Sun, Dec 13, 2020 at 5:22 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> A previous 'rcar_fcp_get()' call must be undone in the error handling path,
> as already done in the remove function.
>
> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: vsp1: Fix an error handling path in the probe function
@ 2020-12-14  7:31   ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2020-12-14  7:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Laurent Pinchart, Kieran Bingham, Mauro Carvalho Chehab,
	Linux Media Mailing List, Linux-Renesas,
	Linux Kernel Mailing List, kernel-janitors

On Sun, Dec 13, 2020 at 5:22 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> A previous 'rcar_fcp_get()' call must be undone in the error handling path,
> as already done in the remove function.
>
> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: vsp1: Fix an error handling path in the probe function
  2020-12-12 17:41 ` Christophe JAILLET
  (?)
  (?)
@ 2020-12-14  9:24 ` Kieran Bingham
  -1 siblings, 0 replies; 7+ messages in thread
From: Kieran Bingham @ 2020-12-14  9:24 UTC (permalink / raw)
  To: Christophe JAILLET, laurent.pinchart, mchehab
  Cc: linux-media, linux-renesas-soc, linux-kernel, kernel-janitors

Hi Christophe,

On 12/12/2020 17:41, Christophe JAILLET wrote:
> A previous 'rcar_fcp_get()' call must be undone in the error handling path,
> as already done in the remove function.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/media/platform/vsp1/vsp1_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
> index dc62533cf32c..aa66e4f5f3f3 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev)
>  	}
>  
>  done:
> -	if (ret)
> +	if (ret) {
>  		pm_runtime_disable(&pdev->dev);
> +		rcar_fcp_put(vsp1->fcp);
> +	}
>  
>  	return ret;
>  }
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: vsp1: Fix an error handling path in the probe function
  2020-12-12 17:41 ` Christophe JAILLET
@ 2020-12-17  3:56   ` Laurent Pinchart
  -1 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-17  3:56 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kieran.bingham+renesas, mchehab, linux-media, linux-renesas-soc,
	linux-kernel, kernel-janitors

Hi Christophe,

Thank you for the patch.

On Sat, Dec 12, 2020 at 06:41:19PM +0100, Christophe JAILLET wrote:
> A previous 'rcar_fcp_get()' call must be undone in the error handling path,
> as already done in the remove function.
> 
> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and queued in my tree for v5.12.

> ---
>  drivers/media/platform/vsp1/vsp1_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
> index dc62533cf32c..aa66e4f5f3f3 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev)
>  	}
>  
>  done:
> -	if (ret)
> +	if (ret) {
>  		pm_runtime_disable(&pdev->dev);
> +		rcar_fcp_put(vsp1->fcp);
> +	}
>  
>  	return ret;
>  }

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: vsp1: Fix an error handling path in the probe function
@ 2020-12-17  3:56   ` Laurent Pinchart
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-17  3:56 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kieran.bingham+renesas, mchehab, linux-media, linux-renesas-soc,
	linux-kernel, kernel-janitors

Hi Christophe,

Thank you for the patch.

On Sat, Dec 12, 2020 at 06:41:19PM +0100, Christophe JAILLET wrote:
> A previous 'rcar_fcp_get()' call must be undone in the error handling path,
> as already done in the remove function.
> 
> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and queued in my tree for v5.12.

> ---
>  drivers/media/platform/vsp1/vsp1_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
> index dc62533cf32c..aa66e4f5f3f3 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev)
>  	}
>  
>  done:
> -	if (ret)
> +	if (ret) {
>  		pm_runtime_disable(&pdev->dev);
> +		rcar_fcp_put(vsp1->fcp);
> +	}
>  
>  	return ret;
>  }

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-17  3:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 17:41 [PATCH] media: vsp1: Fix an error handling path in the probe function Christophe JAILLET
2020-12-12 17:41 ` Christophe JAILLET
2020-12-14  7:31 ` Geert Uytterhoeven
2020-12-14  7:31   ` Geert Uytterhoeven
2020-12-14  9:24 ` Kieran Bingham
2020-12-17  3:56 ` Laurent Pinchart
2020-12-17  3:56   ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.