提交 f1de2c2f 编写于 作者: W Wenyou Yang 提交者: Mark Brown

regulator: act8865: fix incorrect devm_kzalloc for act8865

Which cause to allocate more needless memory.
Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 7da98aaf
......@@ -291,9 +291,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
return -EINVAL;
}
act8865 = devm_kzalloc(dev, sizeof(struct act8865) +
sizeof(struct regulator_dev *) * ACT8865_REG_NUM,
GFP_KERNEL);
act8865 = devm_kzalloc(dev, sizeof(struct act8865), GFP_KERNEL);
if (!act8865)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册