Re: [PATCH 2/5] media: i2c: imx415: Add missing v4l2_subdev_cleanup() call

From: Michael Riesch

Date: Fri Sep 18 2026 - 17:32:30 EST


Hi Aleksandr,

Thanks for the patch, LGTM!

On 9/9/26 10:02, Aleksandr Chubuchnyi wrote:
> The subdev active state allocated by v4l2_subdev_init_finalize() is leaked
> on unbind.
>
> Fixes: 14cd15e7a1e2 ("media: i2c: add imx415 cmos image sensor driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Aleksandr Chubuchnyi <chubuchnyi@xxxxxxxxx>

Reviewed-by: Michael Riesch <michael.riesch@xxxxxxxxxxxxx>

Best regards,
Michael

> ---
> drivers/media/i2c/imx415.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
> index c3b22b238..12c2f3df6 100644
> --- a/drivers/media/i2c/imx415.c
> +++ b/drivers/media/i2c/imx415.c
> @@ -1125,6 +1125,7 @@ static int imx415_subdev_init(struct imx415 *sensor)
>
> static void imx415_subdev_cleanup(struct imx415 *sensor)
> {
> + v4l2_subdev_cleanup(&sensor->subdev);
> media_entity_cleanup(&sensor->subdev.entity);
> v4l2_ctrl_handler_free(&sensor->ctrls);
> }