[PATCH 2.6.19] arm26: replace kmalloc+memset with kzalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace kmalloc+memset with kzalloc 

Signed-off-by: Yan Burman <[email protected]>

diff -rubp linux-2.6.19-rc5_orig/arch/arm26/kernel/ecard.c linux-2.6.19-rc5_kzalloc/arch/arm26/kernel/ecard.c
--- linux-2.6.19-rc5_orig/arch/arm26/kernel/ecard.c	2006-11-09 12:16:22.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/arch/arm26/kernel/ecard.c	2006-11-11 22:44:04.000000000 +0200
@@ -620,12 +620,10 @@ ecard_probe(int slot, card_type_t type)
 	struct ex_ecid cid;
 	int i, rc = -ENOMEM;
 
-	ec = kmalloc(sizeof(ecard_t), GFP_KERNEL);
+	ec = kzalloc(sizeof(ecard_t), GFP_KERNEL);
 	if (!ec)
 		goto nomem;
 
-	memset(ec, 0, sizeof(ecard_t));
-
 	ec->slot_no	= slot;
 	ec->type        = type;
 	ec->irq		= NO_IRQ;




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux