diff options
author | Chunyan Zhang <chunyan.zhang@unisoc.com> | 2019-09-05 18:30:09 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 18:59:22 +0200 |
commit | cbd9a87fbdf93c6d4a8a307b93239be724a6d992 (patch) | |
tree | f05d33e4677c78cd7c767a04ff2becb5c8127b94 | |
parent | 4d5a7f001acc75f1c236e96f2336bf4500cb9374 (diff) | |
download | linux-stable-cbd9a87fbdf93c6d4a8a307b93239be724a6d992.tar.gz linux-stable-cbd9a87fbdf93c6d4a8a307b93239be724a6d992.tar.bz2 linux-stable-cbd9a87fbdf93c6d4a8a307b93239be724a6d992.zip |
clk: sprd: add missing kfree
[ Upstream commit 5e75ea9c67433a065b0e8595ad3c91c7c0ca0d2d ]
The number of config registers for different pll clocks probably are not
same, so we have to use malloc, and should free the memory before return.
Fixes: 3e37b005580b ("clk: sprd: add adjustable pll support")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lkml.kernel.org/r/20190905103009.27166-1-zhang.lyra@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/clk/sprd/pll.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/sprd/pll.c b/drivers/clk/sprd/pll.c index 36b4402bf09e..640270f51aa5 100644 --- a/drivers/clk/sprd/pll.c +++ b/drivers/clk/sprd/pll.c @@ -136,6 +136,7 @@ static unsigned long _sprd_pll_recalc_rate(const struct sprd_pll *pll, k2 + refin * nint * CLK_PLL_1M; } + kfree(cfg); return rate; } @@ -222,6 +223,7 @@ static int _sprd_pll_set_rate(const struct sprd_pll *pll, if (!ret) udelay(pll->udelay); + kfree(cfg); return ret; } |