On Thu Sep 17 10:13:47 2026 +0000, Wentao Liang wrote:
> vpif_probe() takes a reference to the i2c adapter with
> i2c_get_adapter() and passes it to v4l2_i2c_new_subdev_board(),
> which does not consume it, but the reference is never released, so
> it is leaked both when the probe succeeds and when it fails after
> the adapter has been acquired.
>
> Release the reference with i2c_put_adapter() on the success path and
> in the probe_subdev_out cleanup.
>
> Fixes: e7332e3a552f ("V4L/DVB (12176): davinci/vpif_display: Add VPIF display
> driver")
> Cc: [email protected]
> Signed-off-by: Wentao Liang <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/ti/davinci/vpif_display.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/drivers/media/platform/ti/davinci/vpif_display.c
b/drivers/media/platform/ti/davinci/vpif_display.c
index 08877ae1513a..8bea1de6ccc8 100644
--- a/drivers/media/platform/ti/davinci/vpif_display.c
+++ b/drivers/media/platform/ti/davinci/vpif_display.c
@@ -1289,9 +1289,12 @@ static int vpif_probe(struct platform_device *pdev)
if (err)
goto probe_subdev_out;
+ i2c_put_adapter(i2c_adap);
+
return 0;
probe_subdev_out:
+ i2c_put_adapter(i2c_adap);
kfree(vpif_obj.sd);
vpif_unregister:
v4l2_device_unregister(&vpif_obj.v4l2_dev);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]