summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2020-06-03 19:41:22 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-06-23 16:15:31 +0300
commitdc7690a73017e1236202022e26a6aa133f239c8c (patch)
treefa94b1747c83c193976afb8f539f46b90ba1c86e
parent4603a5b4a87ccd6fb90cbfa10195291cfcf6ba34 (diff)
downloadlinux-dc7690a73017e1236202022e26a6aa133f239c8c.tar.xz
media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities()
preview_init_entities() does not call v4l2_ctrl_handler_free() when it fails. Add the missed function to fix it. Fixes: de1135d44f4f ("[media] omap3isp: CCDC, preview engine and resizer") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/platform/omap3isp/isppreview.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c
index 4dbdf3180d10..607b7685c982 100644
--- a/drivers/media/platform/omap3isp/isppreview.c
+++ b/drivers/media/platform/omap3isp/isppreview.c
@@ -2287,7 +2287,7 @@ static int preview_init_entities(struct isp_prev_device *prev)
me->ops = &preview_media_ops;
ret = media_entity_pads_init(me, PREV_PADS_NUM, pads);
if (ret < 0)
- return ret;
+ goto error_handler_free;
preview_init_formats(sd, NULL);
@@ -2320,6 +2320,8 @@ error_video_out:
omap3isp_video_cleanup(&prev->video_in);
error_video_in:
media_entity_cleanup(&prev->subdev.entity);
+error_handler_free:
+ v4l2_ctrl_handler_free(&prev->ctrls);
return ret;
}