On Sun Sep 6 08:10:30 2026 +0100, David Carlier wrote:
> mali_c55_isp_init_controls() initialises isp->handler and adds the
> capabilities control, but mali_c55_unregister_isp() never frees it.
> Neither v4l2_device_unregister_subdev() nor v4l2_subdev_cleanup()
> touches sd->ctrl_handler, so the handler and its control are leaked on
> every unbind or module removal. The probe error path already frees it,
> and the TPG subdevice does so in its own unregister function.
> 
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
> Cc: [email protected]
> Signed-off-by: David Carlier <[email protected]>
> Reviewed-by: Jacopo Mondi <[email protected]>
> Signed-off-by: Jacopo Mondi <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/platform/arm/mali-c55/mali-c55-isp.c | 1 +
 1 file changed, 1 insertion(+)

---

diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c 
b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
index c8464dec9a21..e7c8945a343d 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
@@ -644,6 +644,7 @@ void mali_c55_unregister_isp(struct mali_c55 *mali_c55)
 
        mutex_destroy(&isp->capture_lock);
        v4l2_device_unregister_subdev(&isp->sd);
+       v4l2_ctrl_handler_free(&isp->handler);
        v4l2_subdev_cleanup(&isp->sd);
        media_entity_cleanup(&isp->sd.entity);
 }
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to