From: Shailendra Verma Date: Fri, 2 Dec 2016 04:43:05 +0000 (-0200) Subject: [media] exynos4-is: Clean up file handle in open() error path X-Git-Tag: v4.11-rc1~132^2~124 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5e6df4eb255af36b36f6b31b4bcece23cffefc5c;p=linux.git [media] exynos4-is: Clean up file handle in open() error path 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 Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c index 6028e4fbaed3..d8724fe9e9da 100644 --- a/drivers/media/platform/exynos4-is/fimc-m2m.c +++ b/drivers/media/platform/exynos4-is/fimc-m2m.c @@ -663,8 +663,8 @@ static int fimc_m2m_open(struct file *file) 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: