diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-03-10 05:46:52 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-10 06:24:28 -0400 |
commit | 2d45e78a9a89b099685fbe9708723f3393c10a79 (patch) | |
tree | 418b95232ef006f3ddb06df576e228fe4c229ad2 | |
parent | aaa46b4b1af9f873cccdfe7966d3eda67e43f044 (diff) |
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: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/max1586.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index c2a40a1a9e3e..d23d0577754b 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c | |||
@@ -165,8 +165,7 @@ static int max1586_pmic_probe(struct i2c_client *client, | |||
165 | struct max1586_data *max1586; | 165 | struct max1586_data *max1586; |
166 | int i, id; | 166 | int i, id; |
167 | 167 | ||
168 | max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data) + | 168 | max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data), |
169 | sizeof(struct regulator_dev *) * (MAX1586_V6 + 1), | ||
170 | GFP_KERNEL); | 169 | GFP_KERNEL); |
171 | if (!max1586) | 170 | if (!max1586) |
172 | return -ENOMEM; | 171 | return -ENOMEM; |