lkml.org 
[lkml]   [2001]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] add kmalloc check in drviers/pcmcia/rsrc_mgr.c (245-ac16)
On Sun, Jun 24, 2001 at 10:52:31PM +0200, Eric Lammerts wrote:
[...]
> There are zillions of functions called 'init_module' in the kernel.
> I think my suggestion was better (and it had a \n at the end!)

Agreed. Actually, 'ouch' on point two :) BTW, was it intentional
that you dropped the maintainer from the recipient-list back then?

--- linux-245-ac16-clean/drivers/pcmcia/rsrc_mgr.c Sat May 19 20:59:21 2001+++ linux-245-ac16/drivers/pcmcia/rsrc_mgr.c Sat Jun 23 15:06:54 2001
@@ -189,6 +189,11 @@

/* First, what does a floating port look like? */
b = kmalloc(256, GFP_KERNEL);
+ if (!b) {
+ printk(" -- aborting.\n");
+ printk(KERN_ERR "rsrc_mgr: Out of memory.\n");
+ return;
+ }
memset(b, 0, 256);
for (i = base, most = 0; i < base+num; i += 8) {
if (check_io_resource(i, 8))
--
Regards,
Rasmus(rasmus@jaquet.dk)
You know how dumb the average guy is? Well, by definition, half
of them are even dumber than that.
-- J.R. "Bob" Dobbs
-
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 12:55    [W:0.052 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site