fmr2_probe() registers the v4l2 device and then initializes the TEA575x tuner. If snd_tea575x_init() fails, the error path only releases the I/O region and returns -ENODEV. v4l2_device_register() takes a reference on the parent device which has to be dropped with v4l2_device_unregister(), but the callers of fmr2_probe() only kfree() the card. The reference is therefore never released, and the v4l2 device stays registered after a failed probe. Call v4l2_device_unregister() before releasing the I/O region. Fixes: d4ecc83b79cc ("[media] tea575x-tuner: update to latest V4L2 framework requirements") Cc: stable@vger.kernel.org Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex Signed-off-by: Wentao Liang --- drivers/media/radio/radio-sf16fmr2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 2cc91e576fcd..85d67257295e 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c @@ -241,6 +241,7 @@ static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) 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; } -- 2.34.1