All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: omap-usb-tll: allocate correct size for ch_clk
@ 2014-02-10 19:10 Colin King
  2014-02-10 19:54 ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2014-02-10 19:10 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

ch_clk was erroneously being allocated the incorrect size which
can be problematic for larger sizes of tll->nch

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mfd/omap-usb-tll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 5ee50f7..532eacab 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -252,7 +252,7 @@ static int usbtll_omap_probe(struct platform_device *pdev)
 		break;
 	}
 
-	tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk * [tll->nch]),
+	tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch,
 						GFP_KERNEL);
 	if (!tll->ch_clk) {
 		ret = -ENOMEM;
-- 
1.9.rc1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-11  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 19:10 [PATCH] mfd: omap-usb-tll: allocate correct size for ch_clk Colin King
2014-02-10 19:54 ` Lee Jones
2014-02-11  8:54   ` Roger Quadros

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.