This is a note to let you know that I've just added the patch titled media: i2c: max96717: clean up on error in max96717_subdev_init() to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-i2c-max96717-clean-up-on-error-in-max96717_sub.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit d16e50281c0cd47f67c85a2b0100f49140aa5aa6 Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Fri Sep 27 13:59:10 2024 +0300 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: 19b5e5511ca4 ("media: i2c: max96717: add test pattern ctrl") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Julien Massot <julien.massot@xxxxxxxxxxxxx> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c index 4e85b8eb1e776..9259d58ba734e 100644 --- a/drivers/media/i2c/max96717.c +++ b/drivers/media/i2c/max96717.c @@ -697,8 +697,10 @@ static int max96717_subdev_init(struct max96717_priv *priv) priv->pads[MAX96717_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE; ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads); - if (ret) - return dev_err_probe(dev, ret, "Failed to init pads\n"); + if (ret) { + dev_err_probe(dev, ret, "Failed to init pads\n"); + goto err_free_ctrl; + } ret = v4l2_subdev_init_finalize(&priv->sd); if (ret) {