From f1de2c2f2749ba42b87a49ae57deb346301dec02 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Thu, 26 Dec 2013 14:52:43 +0800 Subject: regulator: act8865: fix incorrect devm_kzalloc for act8865 Which cause to allocate more needless memory. Signed-off-by: Wenyou Yang Signed-off-by: Mark Brown --- drivers/regulator/act8865-regulator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/regulator/act8865-regulator.c') 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, 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; -- cgit v1.2.3-58-ga151