summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-09-19 21:55:18 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-22 10:33:52 +0100
commit7fefb924d7aed7116fe2a68cdbfc9e36318e7300 (patch)
treed8c5402b6bcf91131dbd7fd471f8c3c0591703da /drivers/mtd
parentcdf0a7d16980858e72f5d26bfe48abf01112fab5 (diff)
downloadlinux-7fefb924d7aed7116fe2a68cdbfc9e36318e7300.tar.bz2
[MTD] pmc551 use kzalloc
Use kzalloc instad of kmalloc+memset(0). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/pmc551.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index 4d4023601d22..62a918895df4 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -732,23 +732,20 @@ static int __init init_pmc551(void)
msize = length;
}
- mtd = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
+ mtd = kzalloc(sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd) {
printk(KERN_NOTICE "pmc551: Cannot allocate new MTD "
"device.\n");
break;
}
- memset(mtd, 0, sizeof(struct mtd_info));
-
- priv = kmalloc(sizeof(struct mypriv), GFP_KERNEL);
+ priv = kzalloc(sizeof(struct mypriv), GFP_KERNEL);
if (!priv) {
printk(KERN_NOTICE "pmc551: Cannot allocate new MTD "
"device.\n");
kfree(mtd);
break;
}
- memset(priv, 0, sizeof(*priv));
mtd->priv = priv;
priv->dev = PCI_Device;