aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nftlcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nftlcore.c')
-rw-r--r--drivers/mtd/nftlcore.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index f4d38546068f..4b1ba4fcfcd3 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -57,13 +57,12 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
57 57
58 DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name); 58 DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name);
59 59
60 nftl = kmalloc(sizeof(struct NFTLrecord), GFP_KERNEL); 60 nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL);
61 61
62 if (!nftl) { 62 if (!nftl) {
63 printk(KERN_WARNING "NFTL: out of memory for data structures\n"); 63 printk(KERN_WARNING "NFTL: out of memory for data structures\n");
64 return; 64 return;
65 } 65 }
66 memset(nftl, 0, sizeof(*nftl));
67 66
68 nftl->mbd.mtd = mtd; 67 nftl->mbd.mtd = mtd;
69 nftl->mbd.devnum = -1; 68 nftl->mbd.devnum = -1;