X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fnftlcore.c;h=0c9ce19ea27a3476f44384749476822b3c311cfa;hb=327dafb1c61c9da7b95ac6cc7634a2340cc9509c;hp=f4d38546068ff6f3fc2bf9bbcc00f70ce686caa3;hpb=7014568bad55c20b7ee4f439d78c9e875912d51f;p=linux-2.6 diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index f4d3854606..0c9ce19ea2 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -57,13 +55,12 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name); - nftl = kmalloc(sizeof(struct NFTLrecord), GFP_KERNEL); + nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL); if (!nftl) { printk(KERN_WARNING "NFTL: out of memory for data structures\n"); return; } - memset(nftl, 0, sizeof(*nftl)); nftl->mbd.mtd = mtd; nftl->mbd.devnum = -1;