aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-02 12:32:02 +0100
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 12:32:02 +0100
commite29e65aacbd9e628378084905cbcf62a9fa4a8cc (patch)
tree279e6e87d60da82c082833205c996d7046b1a46d /drivers/md/dm-table.c
parent6c9b27ab08aaf46426515b8b858ad9c60731c7a1 (diff)
dm: use vzalloc
Use vzalloc() instead of vmalloc()+memset(). Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c4
1 files changed, 1 insertions, 3 deletions
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;
}