Commit c2058eab authored by Dave Jones's avatar Dave Jones

[PATCH] missing kmalloc check in airo_cs

parent 6ecad52e
......@@ -242,6 +242,11 @@ static dev_link_t *airo_attach(void)
/* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local) {
printk(KERN_ERR "airo_cs: no memory for new device\n");
kfree (link);
return NULL;
}
memset(local, 0, sizeof(local_info_t));
link->priv = local;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment