aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo_cs.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2005-11-07 18:03:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2005-11-07 21:50:01 -0500
commitb69a3aa85cb7bda2eb6c5932a62c1337d0d6612c (patch)
tree64a65fcec724795c213ab96c1419c95a78c41be4 /drivers/net/wireless/airo_cs.c
parentf36be62115aabd50b4eda0f06f07ab5fae2e9cfd (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/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 */