Re: [PATCH 5/5] media: i2c: st-mipid02: Add missing v4l2_subdev_cleanup() call
From: Benjamin Mugnier
Date: Mon Sep 21 2026 - 05:12:26 EST
Hi,
Thanks, LGTM.
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@xxxxxxxxxxx>
Le 09/09/2026 à 10:02, Aleksandr Chubuchnyi a écrit :
> The subdev active state allocated by v4l2_subdev_init_finalize() is leaked
> on unbind. The driver has no common cleanup helper, so update both sites.
>
> Fixes: 04d170b288b3 ("media: i2c: st-mipid02: use active state to store pad formats")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Aleksandr Chubuchnyi <chubuchnyi@xxxxxxxxx>
> ---
> drivers/media/i2c/st-mipid02.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
> index 4675181af..b2f275129 100644
> --- a/drivers/media/i2c/st-mipid02.c
> +++ b/drivers/media/i2c/st-mipid02.c
> @@ -919,6 +919,7 @@ static int mipid02_probe(struct i2c_client *client)
> power_off:
> mipid02_set_power_off(&client->dev);
> entity_cleanup:
> + v4l2_subdev_cleanup(&bridge->sd);
> media_entity_cleanup(&bridge->sd.entity);
>
> return ret;
> @@ -937,6 +938,7 @@ static void mipid02_remove(struct i2c_client *client)
> if (!pm_runtime_status_suspended(&client->dev))
> mipid02_set_power_off(&client->dev);
> pm_runtime_set_suspended(&client->dev);
> + v4l2_subdev_cleanup(&bridge->sd);
> media_entity_cleanup(&bridge->sd.entity);
> }
>
--
Regards,
Benjamin