aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/docprobe.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-13 15:00:22 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-13 15:00:22 +0000
commit4de3a8e101150feaefa1139611a50ff37467f33e (patch)
treedaada742542518b02d7db7c5d32e715eaa5f166d /drivers/mtd/devices/docprobe.c
parentARM: 7275/1: LPAE: Check the CPU support for the long descriptor format (diff)
parentMerge branch 'akpm' (aka "Andrew's patch-bomb, take two") (diff)
downloadlinux-dev-4de3a8e101150feaefa1139611a50ff37467f33e.tar.xz
linux-dev-4de3a8e101150feaefa1139611a50ff37467f33e.zip
Merge branch 'master' into fixes
Diffstat (limited to 'drivers/mtd/devices/docprobe.c')
-rw-r--r--drivers/mtd/devices/docprobe.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 45116bb30297..706b847b46b3 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -241,8 +241,7 @@ static void __init DoC_Probe(unsigned long physadr)
return;
}
docfound = 1;
- mtd = kmalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
-
+ mtd = kzalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
iounmap(docptr);
@@ -250,10 +249,6 @@ static void __init DoC_Probe(unsigned long physadr)
}
this = (struct DiskOnChip *)(&mtd[1]);
-
- memset((char *)mtd,0, sizeof(struct mtd_info));
- memset((char *)this, 0, sizeof(struct DiskOnChip));
-
mtd->priv = this;
this->virtadr = docptr;
this->physadr = physadr;