public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [KJ] replacing kmalloc with kzalloc in drivers/mtd/chips/cfi_probe.c
@ 2007-08-13  9:46 Surya Prabhakar N
  0 siblings, 0 replies; only message in thread
From: Surya Prabhakar N @ 2007-08-13  9:46 UTC (permalink / raw)
  To: dwmw2, linux-mtd; +Cc: Linux Kernel


Hi,
   Replacing kmalloc with kzalloc and cleaning up memset in 
arch/i386/kernel/io_apic.c


Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
---

diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index 60e11a0..efb51f7 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -203,14 +203,12 @@ static int __xipram cfi_chip_setup(struct map_info *map,
 	if (!num_erase_regions)
 		return 0;
 
-	cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
+	cfi->cfiq = kzalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
 	if (!cfi->cfiq) {
 		printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
 		return 0;
 	}
 
-	memset(cfi->cfiq,0,sizeof(struct cfi_ident));
-
 	cfi->cfi_mode = CFI_MODE_CFI;
 
 	/* Read the CFI info structure */

--
thanks 
surya.


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-13  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13  9:46 [KJ] replacing kmalloc with kzalloc in drivers/mtd/chips/cfi_probe.c Surya Prabhakar N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox