[PATCH] clk: imx93: Fix an error code assignment in imx93_clocks_probe()
Peng Fan
peng.fan at nxp.com
Tue Jun 13 18:56:54 PDT 2023
> Subject: [PATCH] clk: imx93: Fix an error code assignment in
> imx93_clocks_probe()
>
> From: Markus Elfring <elfring at users.sourceforge.net>
> Date: Tue, 13 Jun 2023 21:50:50 +0200
>
> The variable “base” was passed to a call of the function “PTR_ERR”
> in the implementation of the function “imx93_clocks_probe”.
> Unfortunately, the variable was not assigned to an error pointer before this
> if branch.
> Thus use the variable “anatop_base” for an error code assignment instead.
>
> Fixes: e02ba11b4576 ("clk: imx93: fix memory leak and missing unwind goto
> in imx93_clocks_probe")
> Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
> ---
> drivers/clk/imx/clk-imx93.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
Reviewed-by: Peng Fan <peng.fan at nxp.com>
>
> --
> 2.41.0
More information about the linux-arm-kernel
mailing list