Re: [PATCH] wavelan: check request_region return value

Jean Tourrilhes (jt@bougret.hpl.hp.com)
Wed, 9 Jan 2002 14:29:51 -0800


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/