[ARM] Convert kmalloc+memset to kzalloc
Convert all uses of kmalloc followed by memset to use kzalloc instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
18ec5c7312
commit
d2a02b93cf
@ -807,14 +807,12 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
|
||||
unsigned long base;
|
||||
int i;
|
||||
|
||||
ec = kmalloc(sizeof(ecard_t), GFP_KERNEL);
|
||||
ec = kzalloc(sizeof(ecard_t), GFP_KERNEL);
|
||||
if (!ec) {
|
||||
ec = ERR_PTR(-ENOMEM);
|
||||
goto nomem;
|
||||
}
|
||||
|
||||
memset(ec, 0, sizeof(ecard_t));
|
||||
|
||||
ec->slot_no = slot;
|
||||
ec->type = type;
|
||||
ec->irq = NO_IRQ;
|
||||
|
Reference in New Issue
Block a user