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-path-selector.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/md/dm-path-selector.c') diff --git a/drivers/md/dm-path-selector.c b/drivers/md/dm-path-selector.c index f10a0c89b3f..ca1bb636a3e 100644 --- a/drivers/md/dm-path-selector.c +++ b/drivers/md/dm-path-selector.c @@ -94,12 +94,10 @@ out: static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst) { - struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL); + struct ps_internal *psi = kzalloc(sizeof(*psi), GFP_KERNEL); - if (psi) { - memset(psi, 0, sizeof(*psi)); + if (psi) psi->pst = *pst; - } return psi; } -- cgit v1.2.3-18-g5258