On Sun Apr 26 22:16:31 2026 +0900, Myeonghun Pak wrote:
> If the vpe_top resource is missing, vpe_probe() returns -ENODEV after
> v4l2_device_register() has succeeded. Probe failures do not call the
> driver's remove callback, so the v4l2 device remains registered on that
> error path.
> 
> Route that failure through the existing v4l2_device_unregister() unwind
> label, matching the other errors after v4l2_device_register().
> 
> Fixes: 4d59c7d45585 ("media: ti-vpe: vpe: Add missing null pointer checks")
> Cc: [email protected]
> Co-developed-by: Ijae Kim <[email protected]>
> Signed-off-by: Ijae Kim <[email protected]>
> Signed-off-by: Myeonghun Pak <[email protected]>
> Reviewed-by: Yemike Abhilash Chandra <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/platform/ti/vpe/vpe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/platform/ti/vpe/vpe.c 
b/drivers/media/platform/ti/vpe/vpe.c
index a7e5a85e72a1..81bd1f9cee30 100644
--- a/drivers/media/platform/ti/vpe/vpe.c
+++ b/drivers/media/platform/ti/vpe/vpe.c
@@ -2539,7 +2539,8 @@ static int vpe_probe(struct platform_device *pdev)
                                                "vpe_top");
        if (!dev->res) {
                dev_err(&pdev->dev, "missing 'vpe_top' resources data\n");
-               return -ENODEV;
+               ret = -ENODEV;
+               goto v4l2_dev_unreg;
        }
 
        /*
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to