diff options
author | Panagiotis Issaris <takis@issaris.org> | 2005-11-07 18:03:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2005-11-07 21:50:01 -0500 |
commit | b69a3aa85cb7bda2eb6c5932a62c1337d0d6612c (patch) | |
tree | 64a65fcec724795c213ab96c1419c95a78c41be4 /drivers/net/wireless/atmel_cs.c | |
parent | f36be62115aabd50b4eda0f06f07ab5fae2e9cfd (diff) |
[PATCH] wireless net: Conversions of kmalloc/memset to kzalloc
More conversions of kmalloc/memset to kzalloc
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 195cb36619e..1bd13146c64 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 */ |