[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DU0PR04MB94174EB38D6754AC5E6B4F74885AA@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date: Wed, 14 Jun 2023 01:56:54 +0000
From: Peng Fan <peng.fan@....com>
To: Markus Elfring <Markus.Elfring@....de>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
dl-linux-imx <linux-imx@....com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
Abel Vesa <abelvesa@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Zhanhao Hu <zero12113@...t.edu.cn>
CC: LKML <linux-kernel@...r.kernel.org>,
"cocci@...ia.fr" <cocci@...ia.fr>
Subject: RE: [PATCH] clk: imx93: Fix an error code assignment in
imx93_clocks_probe()
> Subject: [PATCH] clk: imx93: Fix an error code assignment in
> imx93_clocks_probe()
>
> From: Markus Elfring <elfring@...rs.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@...rs.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@....com>
>
> --
> 2.41.0
Powered by blists - more mailing lists