summaryrefslogtreecommitdiff
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 33463926a2a6..93fab4fb2adf 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -973,9 +973,8 @@ restart:
}
if (num_consumers == 0)
return 0;
- _consumers = kmalloc_array(num_consumers,
- sizeof(struct regulator_bulk_data),
- GFP_KERNEL);
+ _consumers = kmalloc_objs(struct regulator_bulk_data, num_consumers,
+ GFP_KERNEL);
if (!_consumers)
return -ENOMEM;
goto restart;