patch-2.4.3 linux/drivers/isdn/avmb1/avm_cs.c

Next file: linux/drivers/isdn/avmb1/b1.c
Previous file: linux/drivers/isdn/act2000/module.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/avmb1/avm_cs.c linux/drivers/isdn/avmb1/avm_cs.c
@@ -138,6 +138,8 @@
     
     /* Initialize the dev_link_t structure */
     link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
+    if (!link)
+	return NULL;
     memset(link, 0, sizeof(struct dev_link_t));
     link->release.function = &avmcs_release;
     link->release.data = (u_long)link;
@@ -169,6 +171,8 @@
 
     /* Allocate space for private device-specific data */
     local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
+    if (!local)
+	return NULL;
     memset(local, 0, sizeof(local_info_t));
     link->priv = local;
     

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)