diff options
author | 2021-03-23 11:10:34 +0800 | |
---|---|---|
committer | 2021-04-04 22:39:05 +0300 | |
commit | 054ef44ea3ef2883e0f63c9a54c91c07f321a0b4 (patch) | |
tree | fe9e75d819fc483e101050c526ad2801d169a778 /drivers/clk/imx/clk-scu.c | |
parent | clk: imx8mq: Correct the pcie1 sels (diff) | |
download | linux-054ef44ea3ef2883e0f63c9a54c91c07f321a0b4.tar.gz linux-054ef44ea3ef2883e0f63c9a54c91c07f321a0b4.tar.bz2 linux-054ef44ea3ef2883e0f63c9a54c91c07f321a0b4.zip |
clk: imx: Reference preceded by free
When register failed, clk will be freed, it will generate dangling pointer
problem in later reference. it should return directly.
Signed-off-by: Jian Dong <dongjian@yulong.com>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Diffstat (limited to 'drivers/clk/imx/clk-scu.c')
-rw-r--r-- | drivers/clk/imx/clk-scu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c index 1f5518b7ab39..f89b4da10e80 100644 --- a/drivers/clk/imx/clk-scu.c +++ b/drivers/clk/imx/clk-scu.c @@ -426,6 +426,7 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name, if (ret) { kfree(clk); hw = ERR_PTR(ret); + return hw; } if (dev) |