lkml.org 
[lkml]   [2002]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] wavelan: check request_region return value
From
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/
\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.030 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site