patch-2.4.4 linux/drivers/net/pcmcia/aironet4500_cs.c

Next file: linux/drivers/net/pcmcia/com20020_cs.c
Previous file: linux/drivers/net/pcmcia/3c589_cs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/net/pcmcia/aironet4500_cs.c linux/drivers/net/pcmcia/aironet4500_cs.c
@@ -81,7 +81,7 @@
 static int awc_event(event_t event, int priority,
 					   event_callback_args_t *args);
 
-static dev_link_t *dev_list = NULL;
+static dev_link_t *dev_list;
 
 static void cs_error(client_handle_t handle, int func, int ret)
 {
@@ -179,12 +179,14 @@
 	link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
 	if (!link)
 		return NULL;
+	memset(link, 0, sizeof(struct dev_link_t));
+
 	link->dev = kmalloc(sizeof(struct dev_node_t), GFP_KERNEL);
 	if (!link->dev) {
 		kfree(link);
 		return NULL;
 	}
-	memset(link, 0, sizeof(struct dev_link_t));
+
 	memset(link->dev, 0, sizeof(struct dev_node_t));
 
 	link->release.function = &awc_release;

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