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 784de9109113..fee458fd7a4a 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -172,12 +172,11 @@ static dev_link_t *airo_attach(void)
172 DEBUG(0, "airo_attach()\n"); 172 DEBUG(0, "airo_attach()\n");
173 173
174 /* Initialize the dev_link_t structure */ 174 /* Initialize the dev_link_t structure */
175 link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); 175 link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
176 if (!link) { 176 if (!link) {
177 printk(KERN_ERR "airo_cs: no memory for new device\n"); 177 printk(KERN_ERR "airo_cs: no memory for new device\n");
178 return NULL; 178 return NULL;
179 } 179 }
180 memset(link, 0, sizeof(struct dev_link_t));
181 180
182 /* Interrupt setup */ 181 /* Interrupt setup */
183 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 182 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
@@ -196,13 +195,12 @@ static dev_link_t *airo_attach(void)
196 link->conf.IntType = INT_MEMORY_AND_IO; 195 link->conf.IntType = INT_MEMORY_AND_IO;
197 196
198 /* Allocate space for private device-specific data */ 197 /* Allocate space for private device-specific data */
199 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 198 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
200 if (!local) { 199 if (!local) {
201 printk(KERN_ERR "airo_cs: no memory for new device\n"); 200 printk(KERN_ERR "airo_cs: no memory for new device\n");
202 kfree (link); 201 kfree (link);
203 return NULL; 202 return NULL;
204 } 203 }
205 memset(local, 0, sizeof(local_info_t));
206 link->priv = local; 204 link->priv = local;
207 205
208 /* Register with Card Services */ 206 /* Register with Card Services */