X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Finftlcore.c;h=b0e396504e67cf98d2469afc881594706c706bd9;hb=78514c106b90b628a90c630a3bc87a6538aed865;hp=d2f54c037e0f8622e4c8d8e4bcbdefce8f103bad;hpb=7014568bad55c20b7ee4f439d78c9e875912d51f;p=linux-2.6 diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index d2f54c037e..b0e396504e 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c @@ -67,13 +67,12 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) DEBUG(MTD_DEBUG_LEVEL3, "INFTL: add_mtd for %s\n", mtd->name); - inftl = kmalloc(sizeof(*inftl), GFP_KERNEL); + inftl = kzalloc(sizeof(*inftl), GFP_KERNEL); if (!inftl) { printk(KERN_WARNING "INFTL: Out of memory for data structures\n"); return; } - memset(inftl, 0, sizeof(*inftl)); inftl->mbd.mtd = mtd; inftl->mbd.devnum = -1;