aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo_cs.c')
-rw-r--r--drivers/net/wireless/airo_cs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 96ed8da8661d..e328547599dc 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -170,12 +170,11 @@ static dev_link_t *airo_attach(void)
170 DEBUG(0, "airo_attach()\n"); 170 DEBUG(0, "airo_attach()\n");
171 171
172 /* Initialize the dev_link_t structure */ 172 /* Initialize the dev_link_t structure */
173 link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); 173 link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
174 if (!link) { 174 if (!link) {
175 printk(KERN_ERR "airo_cs: no memory for new device\n"); 175 printk(KERN_ERR "airo_cs: no memory for new device\n");
176 return NULL; 176 return NULL;
177 } 177 }
178 memset(link, 0, sizeof(struct dev_link_t));
179 178
180 /* Interrupt setup */ 179 /* Interrupt setup */
181 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 180 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
@@ -194,13 +193,12 @@ static dev_link_t *airo_attach(void)
194 link->conf.IntType = INT_MEMORY_AND_IO; 193 link->conf.IntType = INT_MEMORY_AND_IO;
195 194
196 /* Allocate space for private device-specific data */ 195 /* Allocate space for private device-specific data */
197 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 196 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
198 if (!local) { 197 if (!local) {
199 printk(KERN_ERR "airo_cs: no memory for new device\n"); 198 printk(KERN_ERR "airo_cs: no memory for new device\n");
200 kfree (link); 199 kfree (link);
201 return NULL; 200 return NULL;
202 } 201 }
203 memset(local, 0, sizeof(local_info_t));
204 link->priv = local; 202 link->priv = local;
205 203
206 /* Register with Card Services */ 204 /* Register with Card Services */