From: Wenyou Yang <wenyou.yang@atmel.com>
To: <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <nicolas.ferre@atmel.com>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <wenyou.yang@atmel.com>
Subject: [PATCH] regulator: act8865: fix incorrect devm_kzalloc for act8865
Date: Thu, 26 Dec 2013 14:52:43 +0800 [thread overview]
Message-ID: <1388040763-15653-1-git-send-email-wenyou.yang@atmel.com> (raw)
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
next reply other threads:[~2013-12-26 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 6:52 Wenyou Yang [this message]
2013-12-30 12:07 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388040763-15653-1-git-send-email-wenyou.yang@atmel.com \
--to=wenyou.yang@atmel.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®