Skip to content

Commit 575f690

Browse files
AxelLinbroonie
authored andcommitted
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: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 98d8618 commit 575f690

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/regulator/max8660.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static int __devinit max8660_probe(struct i2c_client *client,
370370
return -EINVAL;
371371
}
372372

373-
max8660 = kzalloc(sizeof(struct max8660) +
373+
max8660 = devm_kzalloc(&client->dev, sizeof(struct max8660) +
374374
sizeof(struct regulator_dev *) * MAX8660_V_END,
375375
GFP_KERNEL);
376376
if (!max8660)

0 commit comments

Comments
 (0)