aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/clk/davinci
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2020-08-09 16:49:59 +0200
committerStephen Boyd <sboyd@kernel.org>2020-08-18 20:08:23 -0700
commit3dabfa2bda48dab717986609762ce2a49335eb99 (patch)
treed42db224b6313cd250f39a1d6d9568ecbd57f49d /drivers/clk/davinci
parentLinux 5.9-rc1 (diff)
downloadwireguard-linux-3dabfa2bda48dab717986609762ce2a49335eb99.tar.xz
wireguard-linux-3dabfa2bda48dab717986609762ce2a49335eb99.zip
clk: davinci: Use the correct size when allocating memory
'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> Link: https://lore.kernel.org/r/20200809144959.747986-1-christophe.jaillet@wanadoo.fr Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/davinci')
-rw-r--r--drivers/clk/davinci/pll.c2
1 files changed, 1 insertions, 1 deletions
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;