diff options
Diffstat (limited to 'drivers/regulator/act8865-regulator.c')
| -rw-r--r-- | drivers/regulator/act8865-regulator.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index 7652477e6a9d..21e20483bd91 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c | |||
| @@ -424,9 +424,10 @@ static int act8865_pdata_from_dt(struct device *dev, | |||
| 424 | if (matched <= 0) | 424 | if (matched <= 0) |
| 425 | return matched; | 425 | return matched; |
| 426 | 426 | ||
| 427 | pdata->regulators = devm_kzalloc(dev, | 427 | pdata->regulators = devm_kcalloc(dev, |
| 428 | sizeof(struct act8865_regulator_data) * | 428 | num_matches, |
| 429 | num_matches, GFP_KERNEL); | 429 | sizeof(struct act8865_regulator_data), |
| 430 | GFP_KERNEL); | ||
| 430 | if (!pdata->regulators) | 431 | if (!pdata->regulators) |
| 431 | return -ENOMEM; | 432 | return -ENOMEM; |
| 432 | 433 | ||
