Hi,
in smctr.c request_region() return value is not always checked.
Here is a simple patch to fix it.
Patch is against 2.6.16-rc6-git8.
Please CC me on replies,
Regards.

Signed-off-by: Laurent Wandrebeck <[EMAIL PROTECTED]>

--- linux-2.6.16-rc6/drivers/net/tokenring/smctr.c.ori  2006-03-11 
23:12:55.000000000 +0100
+++ linux-2.6.16-rc6/drivers/net/tokenring/smctr.c      2006-03-17 
13:33:11.000000000 +0100
@@ -509,7 +509,10 @@ static int __init smctr_chk_mca(struct n
        r2 = mca_read_stored_pos(tp->slot_num, 2);
        r2 &= 0xF0;
        dev->base_addr = ((__u16)r2 << 8) + (__u16)0x800;
-       request_region(dev->base_addr, SMCTR_IO_EXTENT, smctr_name);
+       if (!request_region(dev->base_addr, SMCTR_IO_EXTENT, smctr_name)) {
+           printf(KERN_ERR "smctr: unable to request region 
%d\n",dev->base_addr);
+           return -EBUSY;
+       }

        /* IRQ */
        r5 = mca_read_stored_pos(tp->slot_num, 5);

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to