* [PATCH] regulator: act8865: fix incorrect devm_kzalloc for act8865
@ 2013-12-26 6:52 Wenyou Yang
2013-12-30 12:07 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Wenyou Yang @ 2013-12-26 6:52 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, nicolas.ferre, linux-kernel, linux-arm-kernel, wenyou.yang
Which cause to allocate more needless memory.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
drivers/regulator/act8865-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
index f853353..aecf01b 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -290,9 +290,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;
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: act8865: fix incorrect devm_kzalloc for act8865
2013-12-26 6:52 [PATCH] regulator: act8865: fix incorrect devm_kzalloc for act8865 Wenyou Yang
@ 2013-12-30 12:07 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-12-30 12:07 UTC (permalink / raw)
To: Wenyou Yang; +Cc: lgirdwood, nicolas.ferre, linux-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 127 bytes --]
On Thu, Dec 26, 2013 at 02:52:43PM +0800, Wenyou Yang wrote:
> Which cause to allocate more needless memory.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-30 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-26 6:52 [PATCH] regulator: act8865: fix incorrect devm_kzalloc for act8865 Wenyou Yang
2013-12-30 12:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®