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/devices/block2mtd.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/devices/block2mtd.c')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 401c6a294baa..6d917a4daa9d 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -295,10 +295,9 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
295 | if (!devname) | 295 | if (!devname) |
296 | return NULL; | 296 | return NULL; |
297 | 297 | ||
298 | dev = kmalloc(sizeof(struct block2mtd_dev), GFP_KERNEL); | 298 | dev = kzalloc(sizeof(struct block2mtd_dev), GFP_KERNEL); |
299 | if (!dev) | 299 | if (!dev) |
300 | return NULL; | 300 | return NULL; |
301 | memset(dev, 0, sizeof(*dev)); | ||
302 | 301 | ||
303 | /* Get a handle on the device */ | 302 | /* Get a handle on the device */ |
304 | bdev = open_bdev_excl(devname, O_RDWR, NULL); | 303 | bdev = open_bdev_excl(devname, O_RDWR, NULL); |