* [PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe()
@ 2016-09-15 2:21 Wei Yongjun
2016-09-21 6:33 ` Robert Jarzmik
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-15 2:21 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Robert Jarzmik, Hans Verkuil,
Guennadi Liakhovetski, Arnd Bergmann
Cc: Wei Yongjun, linux-media
From: Wei Yongjun <weiyongjun1@huawei.com>
Fix to return error code -ENODEV from dma_request_slave_channel_compat()
error handling case instead of 0, as done elsewhere in this function.
Also fix to release resources in v4l2_clk_register() error handling.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/media/platform/pxa_camera.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 1bce7eb..8035290 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2402,6 +2402,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
¶ms, &pdev->dev, "CI_U");
if (!pcdev->dma_chans[1]) {
dev_err(&pdev->dev, "Can't request DMA for Y\n");
+ err = -ENODEV;
goto exit_free_dma_y;
}
@@ -2411,6 +2412,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
¶ms, &pdev->dev, "CI_V");
if (!pcdev->dma_chans[2]) {
dev_err(&pdev->dev, "Can't request DMA for V\n");
+ err = -ENODEV;
goto exit_free_dma_u;
}
@@ -2461,8 +2463,10 @@ static int pxa_camera_probe(struct platform_device *pdev)
pcdev->mclk_clk = v4l2_clk_register(&pxa_camera_mclk_ops,
clk_name, NULL);
- if (IS_ERR(pcdev->mclk_clk))
- return PTR_ERR(pcdev->mclk_clk);
+ if (IS_ERR(pcdev->mclk_clk)) {
+ err = PTR_ERR(pcdev->mclk_clk);
+ goto exit_free_v4l2dev;
+ }
}
err = v4l2_async_notifier_register(&pcdev->v4l2_dev, &pcdev->notifier);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe()
2016-09-15 2:21 [PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe() Wei Yongjun
@ 2016-09-21 6:33 ` Robert Jarzmik
0 siblings, 0 replies; 2+ messages in thread
From: Robert Jarzmik @ 2016-09-21 6:33 UTC (permalink / raw)
To: Wei Yongjun
Cc: Mauro Carvalho Chehab, Hans Verkuil, Guennadi Liakhovetski,
Arnd Bergmann, Wei Yongjun, linux-media
Wei Yongjun <weiyj.lk@gmail.com> writes:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix to return error code -ENODEV from dma_request_slave_channel_compat()
> error handling case instead of 0, as done elsewhere in this function.
>
> Also fix to release resources in v4l2_clk_register() error handling.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-21 6:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 2:21 [PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe() Wei Yongjun
2016-09-21 6:33 ` Robert Jarzmik
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.