regulator: act8865: fix incorrect devm_kzalloc for act8865
Which cause to allocate more needless memory. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
7da98aafa2
commit
f1de2c2f27
1 changed files with 1 additions and 3 deletions
|
@ -291,9 +291,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
act8865 = devm_kzalloc(dev, sizeof(struct act8865) +
|
act8865 = devm_kzalloc(dev, sizeof(struct act8865), GFP_KERNEL);
|
||||||
sizeof(struct regulator_dev *) * ACT8865_REG_NUM,
|
|
||||||
GFP_KERNEL);
|
|
||||||
if (!act8865)
|
if (!act8865)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue