diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-11-15 14:10:29 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-11-28 18:47:21 -0500 |
commit | 95b93a0cd46682c6d9e8eea803fda510cb6b863a (patch) | |
tree | 7e430d3fc04ed20791187d144730dd3052292c67 /drivers/mtd/nftlcore.c | |
parent | 998a43e72d20afa7566dad66fd866fe939a89c09 (diff) |
[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nftlcore.c')
-rw-r--r-- | drivers/mtd/nftlcore.c | 3 |
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; |