* missing return value check for request_region() in in2000.c
@ 2006-03-17 14:11 Laurent Wandrebeck
0 siblings, 0 replies; only message in thread
From: Laurent Wandrebeck @ 2006-03-17 14:11 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm
Hi,
in drivers/scsi/in2000.c, request_region() is called without checking the return
value. Here is a patch to fix it.
Patch against 2.6.16-rc6-git8.
Please CC me on replies.
Regards.
Signed-off-by: Laurent Wandrebeck <l.wandrebeck@free.fr>
--- linux-2.6.16-rc6/drivers/scsi/in2000.c.ori 2006-03-17 14:42:20.000000000 +0100
+++ linux-2.6.16-rc6/drivers/scsi/in2000.c 2006-03-17 14:50:14.000000000 +0100
@@ -2010,7 +2010,12 @@ static int __init in2000_detect(struct s
}
instance->irq = x;
instance->n_io_port = 13;
- request_region(base, 13, "in2000"); /* lock in this IO space for our use */
+ if (!request_region(base, 13, "in2000")) { /* lock in this IO space for our use */
+ printk(KERN_ERR "in2000: unable to reserve region 0x%x\n", base);
+ free_irq(instance->irq, instance);
+ detect_count--;
+ continue;
+ }
for (x = 0; x < 8; x++) {
hostdata->busy[x] = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-17 14:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-17 14:11 missing return value check for request_region() in in2000.c Laurent Wandrebeck
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®