Re: [PATCH] wavelan: check request_region return value

From: Jean Tourrilhes (jt@bougret.hpl.hp.com)
Date: Wed Jan 09 2002 - 17:29:51 EST


On Sun, Dec 30, 2001 at 05:22:29PM -0600, Steven Walter wrote:
> I recently changed several drivers in drivers/net of the Linux kernel to
> correctly check the return value of request_region. Since you appear
> to be the maintainer of this driver, I'm forwarding the patch to you.
>
> Thanks
> --
> -Steven

        For some reason, the tab got mangled, so I redid the
patch. Ready to go in kernel 2.4.X and 2.5.X.

        Jean

diff -u -p linux/drivers/net/wavelan.j1.c linux/drivers/net/wavelan.c
--- linux/drivers/net/wavelan.j1.c Wed Jan 9 14:23:19 2002
+++ linux/drivers/net/wavelan.c Wed Jan 9 14:25:04 2002
@@ -4019,7 +4019,8 @@ static int __init wavelan_config(device
 
         dev->irq = irq;
 
- request_region(ioaddr, sizeof(ha_t), "wavelan");
+ if (!request_region(ioaddr, sizeof(ha_t), "wavelan"))
+ return -EBUSY;
 
         dev->mem_start = 0x0000;
         dev->mem_end = 0x0000;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:29 EST