aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 00:20:32 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:34:05 -0800
commit9ffae0cf3ea02f75d163922accfd3e592d87adde (patch)
tree4974727e9f36e1b618b68d2789644ee3a0d7a371 /drivers/md/linear.c
parent2d1f3b5d1b2cd11a162eb29645df749ec0036413 (diff)
downloadkernel_samsung_smdk4412-9ffae0cf3ea02f75d163922accfd3e592d87adde.zip
kernel_samsung_smdk4412-9ffae0cf3ea02f75d163922accfd3e592d87adde.tar.gz
kernel_samsung_smdk4412-9ffae0cf3ea02f75d163922accfd3e592d87adde.tar.bz2
[PATCH] md: convert md to use kzalloc throughout
Replace multiple kmalloc/memset pairs with kzalloc calls. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 946efef..f46c98d 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -121,11 +121,10 @@ static int linear_run (mddev_t *mddev)
sector_t curr_offset;
struct list_head *tmp;
- conf = kmalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t),
+ conf = kzalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t),
GFP_KERNEL);
if (!conf)
goto out;
- memset(conf, 0, sizeof(*conf) + mddev->raid_disks*sizeof(dev_info_t));
mddev->private = conf;
cnt = 0;