Skip to content
Snippets Groups Projects
Commit e20117a1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

media: i2c: max96717: clean up on error in max96717_subdev_init()


[ Upstream commit d56786977ba11ed15b066495c1363889bcb1c3bb ]

Call v4l2_ctrl_handler_free() to clean up from v4l2_ctrl_handler_init().

Fixes: 19b5e551 ("media: i2c: max96717: add test pattern ctrl")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarJulien Massot <julien.massot@collabora.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 30e42ac0
No related branches found
No related tags found
1 merge request!176🤖 Sync Bot: Update v6.12-ktn to Latest Stable Kernel (v6.12.4)
...@@ -697,8 +697,10 @@ static int max96717_subdev_init(struct max96717_priv *priv) ...@@ -697,8 +697,10 @@ static int max96717_subdev_init(struct max96717_priv *priv)
priv->pads[MAX96717_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE; priv->pads[MAX96717_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads); ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads);
if (ret) if (ret) {
return dev_err_probe(dev, ret, "Failed to init pads\n"); dev_err_probe(dev, ret, "Failed to init pads\n");
goto err_free_ctrl;
}
ret = v4l2_subdev_init_finalize(&priv->sd); ret = v4l2_subdev_init_finalize(&priv->sd);
if (ret) { if (ret) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment