* [PATCH] media: radio-sf16fmr2: unregister v4l2 device on tuner init failure
@ 2026-09-15 1:57 Myeonghun Pak
0 siblings, 0 replies; only message in thread
From: Myeonghun Pak @ 2026-09-15 1:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel, stable
When snd_tea575x_init() fails, fmr2_probe() releases the I/O region
but leaves its v4l2_device registered. Unregister it before returning
to the caller, which frees the containing fmr2 allocation.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: d4ecc83b79cc ("[media] tea575x-tuner: update to latest V4L2 framework requirements")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -241,6 +241,7 @@
if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) {
printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n");
+ v4l2_device_unregister(&fmr2->v4l2_dev);
release_region(fmr2->io, 2);
return -ENODEV;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-15 1:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 1:57 [PATCH] media: radio-sf16fmr2: unregister v4l2 device on tuner init failure Myeonghun Pak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®