linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: davinci: Use the correct size when allocating memory
@ 2020-08-09 14:49 Christophe JAILLET
  2020-08-12 16:06 ` David Lechner
  2020-08-19  3:08 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2020-08-09 14:49 UTC (permalink / raw)
  To: david, nsekhar, mturquette, sboyd
  Cc: linux-clk, linux-kernel, kernel-janitors, Christophe JAILLET

'sizeof(*pllen)' should be used in place of 'sizeof(*pllout)' to avoid a
small over-allocation.

Fixes: 2d1726915159 ("clk: davinci: New driver for davinci PLL clocks")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/clk/davinci/pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c
index 6c35e4bb7940..0d750433eb42 100644
--- a/drivers/clk/davinci/pll.c
+++ b/drivers/clk/davinci/pll.c
@@ -491,7 +491,7 @@ struct clk *davinci_pll_clk_register(struct device *dev,
 		parent_name = postdiv_name;
 	}
 
-	pllen = kzalloc(sizeof(*pllout), GFP_KERNEL);
+	pllen = kzalloc(sizeof(*pllen), GFP_KERNEL);
 	if (!pllen) {
 		ret = -ENOMEM;
 		goto err_unregister_postdiv;
-- 
2.25.1


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

* Re: [PATCH] clk: davinci: Use the correct size when allocating memory
  2020-08-09 14:49 [PATCH] clk: davinci: Use the correct size when allocating memory Christophe JAILLET
@ 2020-08-12 16:06 ` David Lechner
  2020-08-19  3:08 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: David Lechner @ 2020-08-12 16:06 UTC (permalink / raw)
  To: Christophe JAILLET, nsekhar, mturquette, sboyd
  Cc: linux-clk, linux-kernel, kernel-janitors

On 8/9/20 9:49 AM, Christophe JAILLET wrote:
> 'sizeof(*pllen)' should be used in place of 'sizeof(*pllout)' to avoid a
> small over-allocation.
> 
> Fixes: 2d1726915159 ("clk: davinci: New driver for davinci PLL clocks")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Reviewed-by: David Lechner <david@lechnology.com>

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

* Re: [PATCH] clk: davinci: Use the correct size when allocating memory
  2020-08-09 14:49 [PATCH] clk: davinci: Use the correct size when allocating memory Christophe JAILLET
  2020-08-12 16:06 ` David Lechner
@ 2020-08-19  3:08 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-08-19  3:08 UTC (permalink / raw)
  To: Christophe JAILLET, david, mturquette, nsekhar
  Cc: linux-clk, linux-kernel, kernel-janitors, Christophe JAILLET

Quoting Christophe JAILLET (2020-08-09 07:49:59)
> 'sizeof(*pllen)' should be used in place of 'sizeof(*pllout)' to avoid a
> small over-allocation.
> 
> Fixes: 2d1726915159 ("clk: davinci: New driver for davinci PLL clocks")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Applied to clk-fixes

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

end of thread, other threads:[~2020-08-19  3:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09 14:49 [PATCH] clk: davinci: Use the correct size when allocating memory Christophe JAILLET
2020-08-12 16:06 ` David Lechner
2020-08-19  3:08 ` Stephen Boyd

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).