projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: Use array_size() in vzalloc()
[linux-block.git]
/
block
/
partitions
/
check.c
diff --git
a/block/partitions/check.c
b/block/partitions/check.c
index 720145c49066ccd6e77449033aa3c6f910b7c2d5..ffe408fead0cdf8ca137be725540e35aa122572a 100644
(file)
--- a/
block/partitions/check.c
+++ b/
block/partitions/check.c
@@
-122,7
+122,7
@@
static struct parsed_partitions *allocate_partitions(struct gendisk *hd)
return NULL;
nr = disk_max_parts(hd);
- state->parts = vzalloc(
nr * sizeof(state->parts[0]
));
+ state->parts = vzalloc(
array_size(nr, sizeof(state->parts[0])
));
if (!state->parts) {
kfree(state);
return NULL;