aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunyan Zhang <[email protected]>2019-09-05 18:30:09 +0800
committerStephen Boyd <[email protected]>2019-09-17 22:01:02 -0700
commit5e75ea9c67433a065b0e8595ad3c91c7c0ca0d2d (patch)
treeeeee2f3d17b5a377b866757d923136f63b33aac1
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
clk: sprd: add missing kfree
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 <[email protected]> Signed-off-by: Chunyan Zhang <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
-rw-r--r--drivers/clk/sprd/pll.c2
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;
}