diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2013-12-26 01:52:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-30 07:06:55 -0500 |
commit | f1de2c2f2749ba42b87a49ae57deb346301dec02 (patch) | |
tree | 9c985d7a50139ef689694cf0fee2038f76ccc8ef /drivers/regulator/act8865-regulator.c | |
parent | 7da98aafa2bee3583d675235c6113a57b4f20697 (diff) |
regulator: act8865: fix incorrect devm_kzalloc for act8865
Which cause to allocate more needless memory.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/act8865-regulator.c')
-rw-r--r-- | drivers/regulator/act8865-regulator.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index e7dbdc046683..f816ad866a43 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c | |||
@@ -291,9 +291,7 @@ static int act8865_pmic_probe(struct i2c_client *client, | |||
291 | return -EINVAL; | 291 | return -EINVAL; |
292 | } | 292 | } |
293 | 293 | ||
294 | act8865 = devm_kzalloc(dev, sizeof(struct act8865) + | 294 | act8865 = devm_kzalloc(dev, sizeof(struct act8865), GFP_KERNEL); |
295 | sizeof(struct regulator_dev *) * ACT8865_REG_NUM, | ||
296 | GFP_KERNEL); | ||
297 | if (!act8865) | 295 | if (!act8865) |
298 | return -ENOMEM; | 296 | return -ENOMEM; |
299 | 297 | ||