Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d45e78a authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

regulator: max1586: Don't allocate memory for regulator_dev pointers



Do not allocate memory for 'struct regulator_dev *' since it was removed
from state container (values returned by devm_regulator_register() are
not used outside of probe).

Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent aaa46b4b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -165,8 +165,7 @@ static int max1586_pmic_probe(struct i2c_client *client,
	struct max1586_data *max1586;
	int i, id;

	max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data) +
			sizeof(struct regulator_dev *) * (MAX1586_V6 + 1),
	max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data),
			GFP_KERNEL);
	if (!max1586)
		return -ENOMEM;