summaryrefslogtreecommitdiffstats
path: root/drivers/fmc/fmc-sdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fmc/fmc-sdb.c')
-rw-r--r--drivers/fmc/fmc-sdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/fmc/fmc-sdb.c b/drivers/fmc/fmc-sdb.c
index ffdc1762b580..d0e65b86dc22 100644
--- a/drivers/fmc/fmc-sdb.c
+++ b/drivers/fmc/fmc-sdb.c
@@ -48,8 +48,8 @@ static struct sdb_array *__fmc_scan_sdb_tree(struct fmc_device *fmc,
arr = kzalloc(sizeof(*arr), GFP_KERNEL);
if (!arr)
return ERR_PTR(-ENOMEM);
- arr->record = kzalloc(sizeof(arr->record[0]) * n, GFP_KERNEL);
- arr->subtree = kzalloc(sizeof(arr->subtree[0]) * n, GFP_KERNEL);
+ arr->record = kcalloc(n, sizeof(arr->record[0]), GFP_KERNEL);
+ arr->subtree = kcalloc(n, sizeof(arr->subtree[0]), GFP_KERNEL);
if (!arr->record || !arr->subtree) {
kfree(arr->record);
kfree(arr->subtree);