From: Mariusz Kozlowski drivers/md/dm-target.c | 3300 -> 3271 (-29 bytes) drivers/md/dm-target.o | 105641 -> 105449 (-192 bytes) Signed-off-by: Mariusz Kozlowski Cc: Alasdair G Kergon Signed-off-by: Andrew Morton --- drivers/md/dm-target.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff -puN drivers/md/dm-target.c~drivers-md-dm-targetc-kmalloc-memset-conversion-to-kzalloc drivers/md/dm-target.c --- a/drivers/md/dm-target.c~drivers-md-dm-targetc-kmalloc-memset-conversion-to-kzalloc +++ a/drivers/md/dm-target.c @@ -88,12 +88,11 @@ void dm_put_target_type(struct target_ty static struct tt_internal *alloc_target(struct target_type *t) { - struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL); + struct tt_internal *ti; - if (ti) { - memset(ti, 0, sizeof(*ti)); + ti = kzalloc(sizeof(*ti), GFP_KERNEL); + if (ti) ti->tt = *t; - } return ti; } _