提交 575f690d 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion

commit 4d26f7 "regulator: max8660: Use devm_kzalloc()" missed to
replace kzalloc by devm_kzalloc. Fix it.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 98d8618a
......@@ -370,7 +370,7 @@ static int __devinit max8660_probe(struct i2c_client *client,
return -EINVAL;
}
max8660 = kzalloc(sizeof(struct max8660) +
max8660 = devm_kzalloc(&client->dev, sizeof(struct max8660) +
sizeof(struct regulator_dev *) * MAX8660_V_END,
GFP_KERNEL);
if (!max8660)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册