Commit 2f481316 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by Greg Kroah-Hartman

staging: ft1000: optimize kmalloc to kzalloc

Use kzalloc rather than kmalloc followed by memset with 0.
Found by coccinelle.
Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1840c15b
......@@ -120,11 +120,10 @@ static int ft1000_attach(struct pcmcia_device *link)
DEBUG(0, "ft1000_cs: ft1000_attach()\n");
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local) {
return -ENOMEM;
}
memset(local, 0, sizeof(local_info_t));
local->link = link;
link->priv = local;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment