V4L/DVB (7092): radio-sf16fmr2: fix request_region() validation [bugzilla 9699]
authorDouglas Schilling Landgraf <dougsland@gmail.com>
Sun, 27 Jan 2008 17:29:51 +0000 (14:29 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:14:59 +0000 (11:14 -0300)
This patch changed the request_region() validation to avoid invalid return.
Thanks to Roland Kletzing <devzero@web.de> for bug report and data collection.

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

index f7c8b000404fffbe587b0d9ca2e96ed0c4aeadc8..ebc5fbbc38bb3534b408cccd0785e2a5e2ea80fd 100644 (file)
@@ -470,9 +470,8 @@ static int __init fmr2_init(void)
 
        mutex_init(&lock);
 
-       if (request_region(io, 2, "sf16fmr2"))
-       {
-               printk(KERN_ERR "fmr2: port 0x%x already in use\n", io);
+       if (!request_region(io, 2, "sf16fmr2")) {
+               printk(KERN_ERR "radio-sf16fmr2: request_region failed!\n");
                return -EBUSY;
        }