mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[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>
This commit is contained in:
parent
f36be62115
commit
b69a3aa85c
6 changed files with 19 additions and 39 deletions
|
@ -180,12 +180,11 @@ static dev_link_t *atmel_attach(void)
|
|||
DEBUG(0, "atmel_attach()\n");
|
||||
|
||||
/* Initialize the dev_link_t structure */
|
||||
link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
|
||||
link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
|
||||
if (!link) {
|
||||
printk(KERN_ERR "atmel_cs: no memory for new device\n");
|
||||
return NULL;
|
||||
}
|
||||
memset(link, 0, sizeof(struct dev_link_t));
|
||||
|
||||
/* Interrupt setup */
|
||||
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
|
||||
|
@ -204,13 +203,12 @@ static dev_link_t *atmel_attach(void)
|
|||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
|
||||
/* Allocate space for private device-specific data */
|
||||
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
|
||||
local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
|
||||
if (!local) {
|
||||
printk(KERN_ERR "atmel_cs: no memory for new device\n");
|
||||
kfree (link);
|
||||
return NULL;
|
||||
}
|
||||
memset(local, 0, sizeof(local_info_t));
|
||||
link->priv = local;
|
||||
|
||||
/* Register with Card Services */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue