[media] exynos4-is: Clean up file handle in open() error path
authorShailendra Verma <shailendra.v@samsung.com>
Fri, 2 Dec 2016 04:43:05 +0000 (02:43 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 11:58:42 +0000 (09:58 -0200)
The file handle is not yet added in the vfd list. So no need
to call v4l2_fh_del(&ctx->fh) if it fails to create controls.

Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/exynos4-is/fimc-m2m.c

index 6028e4fbaed35f3a7cf49e151ad9145fcaba9def..d8724fe9e9dae7ca7173c31610b62b04e92141ca 100644 (file)
@@ -663,8 +663,8 @@ error_m2m_ctx:
        v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
 error_c:
        fimc_ctrls_delete(ctx);
-error_fh:
        v4l2_fh_del(&ctx->fh);
+error_fh:
        v4l2_fh_exit(&ctx->fh);
        kfree(ctx);
 unlock: