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

Commit f1de2c2f authored by Wenyou Yang's avatar Wenyou Yang Committed by Mark Brown
Browse files

regulator: act8865: fix incorrect devm_kzalloc for act8865



Which cause to allocate more needless memory.

Signed-off-by: default avatarWenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7da98aaf
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;