diff options
Diffstat (limited to 'drivers/net/wireless/atmel_cs.c')
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 195cb36619e8..1bd13146c644 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -180,12 +180,11 @@ static dev_link_t *atmel_attach(void) | |||
180 | DEBUG(0, "atmel_attach()\n"); | 180 | DEBUG(0, "atmel_attach()\n"); |
181 | 181 | ||
182 | /* Initialize the dev_link_t structure */ | 182 | /* Initialize the dev_link_t structure */ |
183 | link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); | 183 | link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL); |
184 | if (!link) { | 184 | if (!link) { |
185 | printk(KERN_ERR "atmel_cs: no memory for new device\n"); | 185 | printk(KERN_ERR "atmel_cs: no memory for new device\n"); |
186 | return NULL; | 186 | return NULL; |
187 | } | 187 | } |
188 | memset(link, 0, sizeof(struct dev_link_t)); | ||
189 | 188 | ||
190 | /* Interrupt setup */ | 189 | /* Interrupt setup */ |
191 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | 190 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; |
@@ -204,13 +203,12 @@ static dev_link_t *atmel_attach(void) | |||
204 | link->conf.IntType = INT_MEMORY_AND_IO; | 203 | link->conf.IntType = INT_MEMORY_AND_IO; |
205 | 204 | ||
206 | /* Allocate space for private device-specific data */ | 205 | /* Allocate space for private device-specific data */ |
207 | local = kmalloc(sizeof(local_info_t), GFP_KERNEL); | 206 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
208 | if (!local) { | 207 | if (!local) { |
209 | printk(KERN_ERR "atmel_cs: no memory for new device\n"); | 208 | printk(KERN_ERR "atmel_cs: no memory for new device\n"); |
210 | kfree (link); | 209 | kfree (link); |
211 | return NULL; | 210 | return NULL; |
212 | } | 211 | } |
213 | memset(local, 0, sizeof(local_info_t)); | ||
214 | link->priv = local; | 212 | link->priv = local; |
215 | 213 | ||
216 | /* Register with Card Services */ | 214 | /* Register with Card Services */ |