V4L/DVB (7093): radio-sf16fmi: fix request_region()
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 27 Jan 2008 17:43:20 +0000 (14:43 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:14:59 +0000 (11:14 -0300)
isapnp_fmi_probe attaches device. However, if request_region() fails, the
device isn't disattached.

Reviewed-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/radio/radio-sf16fmi.c

index 3118bdab3183d674b0b13e94176f1d97a4cb03c7..53e1148573778de36291239684bd1d9b0093fe2a 100644 (file)
@@ -361,6 +361,7 @@ static int __init fmi_init(void)
        }
        if (!request_region(io, 2, "radio-sf16fmi")) {
                printk(KERN_ERR "radio-sf16fmi: port 0x%x already in use\n", io);
+               pnp_device_detach(dev);
                return -EBUSY;
        }