diff mbox

[1/4,media] mem2mem_testdev: Fix incorrect location of v4l2_m2m_release()

Message ID 1348467468-19854-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Sept. 24, 2012, 6:17 a.m. UTC
v4l2_m2m_release() was placed after the return statement and outside
any of the goto labels and hence was not getting executed under the
error exit path. This patch moves it under the exit path label.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/media/platform/mem2mem_testdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Marek Szyprowski Sept. 24, 2012, 6:55 a.m. UTC | #1
Hello,

On Monday, September 24, 2012 8:18 AM Sachin Kamat wrote:

> v4l2_m2m_release() was placed after the return statement and outside
> any of the goto labels and hence was not getting executed under the
> error exit path. This patch moves it under the exit path label.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>  drivers/media/platform/mem2mem_testdev.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/platform/mem2mem_testdev.c
> b/drivers/media/platform/mem2mem_testdev.c
> index 771a84f..fc95559 100644
> --- a/drivers/media/platform/mem2mem_testdev.c
> +++ b/drivers/media/platform/mem2mem_testdev.c
> @@ -1067,8 +1067,8 @@ static int m2mtest_probe(struct platform_device *pdev)
> 
>  	return 0;
> 
> -	v4l2_m2m_release(dev->m2m_dev);
>  err_m2m:
> +	v4l2_m2m_release(dev->m2m_dev);
>  	video_unregister_device(dev->vfd);
>  rel_vdev:
>  	video_device_release(vfd);
> --
> 1.7.4.1

Best regards
diff mbox

Patch

diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c
index 771a84f..fc95559 100644
--- a/drivers/media/platform/mem2mem_testdev.c
+++ b/drivers/media/platform/mem2mem_testdev.c
@@ -1067,8 +1067,8 @@  static int m2mtest_probe(struct platform_device *pdev)
 
 	return 0;
 
-	v4l2_m2m_release(dev->m2m_dev);
 err_m2m:
+	v4l2_m2m_release(dev->m2m_dev);
 	video_unregister_device(dev->vfd);
 rel_vdev:
 	video_device_release(vfd);