summaryrefslogtreecommitdiff
path: root/drivers/power/supply/z2_battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/z2_battery.c')
-rw-r--r--drivers/power/supply/z2_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/z2_battery.c b/drivers/power/supply/z2_battery.c
index 8a43b49cfd35..bcc2d1a9b0a7 100644
--- a/drivers/power/supply/z2_battery.c
+++ b/drivers/power/supply/z2_battery.c
@@ -146,7 +146,7 @@ static int z2_batt_ps_init(struct z2_charger *charger, int props)
if (info->min_voltage >= 0)
props++; /* POWER_SUPPLY_PROP_VOLTAGE_MIN */
- prop = kzalloc(props * sizeof(*prop), GFP_KERNEL);
+ prop = kcalloc(props, sizeof(*prop), GFP_KERNEL);
if (!prop)
return -ENOMEM;