[PATCH] arm26: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> CC: Ian Molton <spyro@f2s.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b593e48d2b
commit
a0172a6dd9
@@ -620,12 +620,10 @@ ecard_probe(int slot, card_type_t type)
|
|||||||
struct ex_ecid cid;
|
struct ex_ecid cid;
|
||||||
int i, rc = -ENOMEM;
|
int i, rc = -ENOMEM;
|
||||||
|
|
||||||
ec = kmalloc(sizeof(ecard_t), GFP_KERNEL);
|
ec = kzalloc(sizeof(ecard_t), GFP_KERNEL);
|
||||||
if (!ec)
|
if (!ec)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
memset(ec, 0, sizeof(ecard_t));
|
|
||||||
|
|
||||||
ec->slot_no = slot;
|
ec->slot_no = slot;
|
||||||
ec->type = type;
|
ec->type = type;
|
||||||
ec->irq = NO_IRQ;
|
ec->irq = NO_IRQ;
|
||||||
|
Reference in New Issue
Block a user