* [PATCH] media: ti: vpe: unwind v4l2 device registration on probe error
@ 2026-04-26 13:16 박명훈
0 siblings, 0 replies; only message in thread
From: 박명훈 @ 2026-04-26 13:16 UTC (permalink / raw)
To: Yemike Abhilash Chandra, Mauro Carvalho Chehab
Cc: linux-media, linux-kernel, stable, Ijae Kim, Myeonghun Pak
From: Myeonghun Pak <mhun512@gmail.com>
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: stable@vger.kernel.org
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
Notes for send preparation:
- Fixes tag was validated against upstream history; the local row worktree
remains shallow/grafted and cannot verify it by itself.
- Build was not completed because this worktree has no .config.
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 a7e5a85e72..81bd1f9cee 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;
}
/*
--
2.39.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-26 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26 13:16 [PATCH] media: ti: vpe: unwind v4l2 device registration on probe error 박명훈
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox