[media] mem2mem_testdev: Fix incorrect location of v4l2_m2m_release()
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 24 Sep 2012 05:17:45 +0000 (02:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 6 Oct 2012 14:50:51 +0000 (11:50 -0300)
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/mem2mem_testdev.c

index d03637537118047a6ced26241cb55842de398d02..43395dfa20ee1bccfd24988be73b90d6fae1b4c6 100644 (file)
@@ -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);