diff options
author | Jian Dong <dongjian@yulong.com> | 2021-03-23 04:10:34 +0100 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2021-04-04 21:39:05 +0200 |
commit | 054ef44ea3ef2883e0f63c9a54c91c07f321a0b4 (patch) | |
tree | fe9e75d819fc483e101050c526ad2801d169a778 /drivers/clk/imx/clk-lpcg-scu.c | |
parent | clk: imx8mq: Correct the pcie1 sels (diff) | |
download | linux-054ef44ea3ef2883e0f63c9a54c91c07f321a0b4.tar.xz 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-lpcg-scu.c')
-rw-r--r-- | drivers/clk/imx/clk-lpcg-scu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index 77be7632866d..dd5abd09f3e2 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -114,6 +114,7 @@ struct clk_hw *__imx_clk_lpcg_scu(struct device *dev, const char *name, if (ret) { kfree(clk); hw = ERR_PTR(ret); + return hw; } if (dev) |