linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <matthias@kaehlcke.net>
To: "AnilKumar, Chimata" <anilkumar@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: [PATCH] mfd: Fix allocation size of tps65217 platform data
Date: Wed, 8 Aug 2012 23:00:51 +0200	[thread overview]
Message-ID: <20120808210051.GD30282@darwin> (raw)

tps65217_parse_dt() allocates a struct tps65217_board for each regulator
specified in the device tree. the structure itself provides arrays for
the pointers to the regulator init data and the regulator device tree node,
so only one instance of it is needed

This patch is based on the mfd tree

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
 drivers/mfd/tps65217.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 61c097a..cf908ac 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -162,7 +162,7 @@ static struct tps65217_board *tps65217_parse_dt(struct i2c_client *client)
 		return NULL;
 
 	count = ret;
-	pdata = devm_kzalloc(&client->dev, count * sizeof(*pdata), GFP_KERNEL);
+	pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
 		return NULL;
 
-- 
1.7.10


             reply	other threads:[~2012-08-08 21:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 21:00 Matthias Kaehlcke [this message]
2012-08-13  6:54 ` [PATCH] mfd: Fix allocation size of tps65217 platform data AnilKumar, Chimata

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=20120808210051.GD30282@darwin \
    --to=matthias@kaehlcke.net \
    --cc=anilkumar@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.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;
as well as URLs for NNTP newsgroup(s).