From 22c6095f86a0d61090b5c49c8e318cfd7cb6673d Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 19 Sep 2006 21:55:18 +0200 Subject: [PATCH] --- yaml --- r: 34147 b: refs/heads/master c: 7fefb924d7aed7116fe2a68cdbfc9e36318e7300 h: refs/heads/master i: 34145: 71f4a77003db618f4ca7b2d96d589dd408366076 34143: 639995327c54e5159287db0494c59cbbf95ff74a v: v3 --- [refs] | 2 +- trunk/drivers/mtd/devices/pmc551.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 11918b0eadcd..60f456460c9b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cdf0a7d16980858e72f5d26bfe48abf01112fab5 +refs/heads/master: 7fefb924d7aed7116fe2a68cdbfc9e36318e7300 diff --git a/trunk/drivers/mtd/devices/pmc551.c b/trunk/drivers/mtd/devices/pmc551.c index 4d4023601d22..62a918895df4 100644 --- a/trunk/drivers/mtd/devices/pmc551.c +++ b/trunk/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;