Skip to content

Commit

Permalink
regulator: act8865: fix incorrect devm_kzalloc for act8865
Browse files Browse the repository at this point in the history
Which cause to allocate more needless memory.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Wenyou Yang authored and Mark Brown committed Dec 30, 2013
1 parent 7da98aa commit f1de2c2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/regulator/act8865-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
return -EINVAL;
}

act8865 = devm_kzalloc(dev, sizeof(struct act8865) +
sizeof(struct regulator_dev *) * ACT8865_REG_NUM,
GFP_KERNEL);
act8865 = devm_kzalloc(dev, sizeof(struct act8865), GFP_KERNEL);
if (!act8865)
return -ENOMEM;

Expand Down

0 comments on commit f1de2c2

Please sign in to comment.