From 094262db9e4c615e0db7a7b924d244b7a6c186b0 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Fri, 19 Oct 2007 22:38:51 +0100 Subject: dm: use kzalloc Convert kmalloc() + memset() to kzalloc(). Signed-off-by: Dmitry Monakhov Signed-off-by: Alasdair G Kergon --- drivers/md/dm-target.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/md/dm-target.c') diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c index 477a041a41c..835cf95b857 100644 --- a/drivers/md/dm-target.c +++ b/drivers/md/dm-target.c @@ -88,12 +88,10 @@ void dm_put_target_type(struct target_type *t) static struct tt_internal *alloc_target(struct target_type *t) { - struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL); + struct tt_internal *ti = kzalloc(sizeof(*ti), GFP_KERNEL); - if (ti) { - memset(ti, 0, sizeof(*ti)); + if (ti) ti->tt = *t; - } return ti; } -- cgit v1.2.3-70-g09d2