diff options
author | Geert Uytterhoeven <[email protected]> | 2023-07-11 17:08:12 +0200 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2023-07-19 14:05:24 -0700 |
commit | a29b2fccf5f2689a9637be85ff1f51c834c6fb33 (patch) | |
tree | 77ceec75516090e333749ef01f418a1dd6a563f2 | |
parent | 1eb8d61ac5c9c7ec56bb96d433532807509b9288 (diff) |
clk: imx93: Propagate correct error in imx93_clocks_probe()
smatch reports:
drivers/clk/imx/clk-imx93.c:294 imx93_clocks_probe() error: uninitialized symbol 'base'.
Indeed, in case of an error, the wrong (yet uninitialized) variable is
converted to an error code and returned.
Fix this by propagating the error code in the correct variable.
Fixes: e02ba11b45764705 ("clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Peng Fan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
-rw-r--r-- | drivers/clk/imx/clk-imx93.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c index b6c7c2725906..44f435103c65 100644 --- a/drivers/clk/imx/clk-imx93.c +++ b/drivers/clk/imx/clk-imx93.c @@ -291,7 +291,7 @@ static int imx93_clocks_probe(struct platform_device *pdev) anatop_base = devm_of_iomap(dev, np, 0, NULL); of_node_put(np); if (WARN_ON(IS_ERR(anatop_base))) { - ret = PTR_ERR(base); + ret = PTR_ERR(anatop_base); goto unregister_hws; } |