[PATCH] mfd: Fix allocation size of tps65217 platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux