Commit 1421814a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dm-table.c: proper usage of dm_vcalloc

From: Kevin Corry <kevcorry@us.ibm.com>

dm-table.c: Proper usage of dm_vcalloc. [Dave Olien]
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 111ad9d1
...@@ -181,8 +181,8 @@ static int alloc_targets(struct dm_table *t, unsigned int num) ...@@ -181,8 +181,8 @@ static int alloc_targets(struct dm_table *t, unsigned int num)
/* /*
* Allocate both the target array and offset array at once. * Allocate both the target array and offset array at once.
*/ */
n_highs = (sector_t *) dm_vcalloc(sizeof(struct dm_target) + n_highs = (sector_t *) dm_vcalloc(num, sizeof(struct dm_target) +
sizeof(sector_t), num); sizeof(sector_t));
if (!n_highs) if (!n_highs)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment