Commit dc7690a7 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Mauro Carvalho Chehab

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: de1135d4 ("[media] omap3isp: CCDC, preview engine and resizer")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 4603a5b4
...@@ -2287,7 +2287,7 @@ static int preview_init_entities(struct isp_prev_device *prev) ...@@ -2287,7 +2287,7 @@ static int preview_init_entities(struct isp_prev_device *prev)
me->ops = &preview_media_ops; me->ops = &preview_media_ops;
ret = media_entity_pads_init(me, PREV_PADS_NUM, pads); ret = media_entity_pads_init(me, PREV_PADS_NUM, pads);
if (ret < 0) if (ret < 0)
return ret; goto error_handler_free;
preview_init_formats(sd, NULL); preview_init_formats(sd, NULL);
...@@ -2320,6 +2320,8 @@ static int preview_init_entities(struct isp_prev_device *prev) ...@@ -2320,6 +2320,8 @@ static int preview_init_entities(struct isp_prev_device *prev)
omap3isp_video_cleanup(&prev->video_in); omap3isp_video_cleanup(&prev->video_in);
error_video_in: error_video_in:
media_entity_cleanup(&prev->subdev.entity); media_entity_cleanup(&prev->subdev.entity);
error_handler_free:
v4l2_ctrl_handler_free(&prev->ctrls);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment