]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] exynos-gsc: Clean up file handle in open() error path
authorShailendra Verma <shailendra.v@samsung.com>
Fri, 2 Dec 2016 04:45:27 +0000 (02:45 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 12:01:53 +0000 (10:01 -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/exynos-gsc/gsc-m2m.c

index f49f24b4462abe62992837f95a1ab1724a6fd695..82505025d96c422d3b66ba82a70c70454740bef3 100644 (file)
@@ -675,8 +675,8 @@ static int gsc_m2m_open(struct file *file)
 
 error_ctrls:
        gsc_ctrls_delete(ctx);
-error_fh:
        v4l2_fh_del(&ctx->fh);
+error_fh:
        v4l2_fh_exit(&ctx->fh);
        kfree(ctx);
 unlock: