From e29e65aacbd9e628378084905cbcf62a9fa4a8cc Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 2 Aug 2011 12:32:02 +0100 Subject: dm: use vzalloc Use vzalloc() instead of vmalloc()+memset(). Signed-off-by: Joe Perches Signed-off-by: Alasdair G Kergon --- drivers/md/dm-table.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/md/dm-table.c') diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 3909fa259f5..8dc67555e73 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -153,9 +153,7 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size) return NULL; size = nmemb * elem_size; - addr = vmalloc(size); - if (addr) - memset(addr, 0, size); + addr = vzalloc(size); return addr; } -- cgit v1.2.3