From nobody Mon Feb 9 05:45:40 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63033C00528 for ; Tue, 11 Jul 2023 15:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230460AbjGKPI6 (ORCPT ); Tue, 11 Jul 2023 11:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbjGKPI1 (ORCPT ); Tue, 11 Jul 2023 11:08:27 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52100100 for ; Tue, 11 Jul 2023 08:08:25 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:2b42:575f:41f:104f]) by baptiste.telenet-ops.be with bizsmtp id Kr8E2A00Z4w94eT01r8FTj; Tue, 11 Jul 2023 17:08:23 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qJEyG-00199o-07; Tue, 11 Jul 2023 17:08:14 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qJEyM-00EwhP-PX; Tue, 11 Jul 2023 17:08:14 +0200 From: Geert Uytterhoeven To: Zhanhao Hu , Abel Vesa , Dan Carpenter , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: NXP Linux Team , kernel test robot , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] clk: imx93: Propagate correct error in imx93_clocks_probe() Date: Tue, 11 Jul 2023 17:08:12 +0200 Message-Id: <20230711150812.3562221-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" smatch reports: drivers/clk/imx/clk-imx93.c:294 imx93_clocks_probe() error: uninitializ= ed 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 go= to in imx93_clocks_probe") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/9c2acd81-3ad8-485d-819e-9e4201277831@ka= dam.mountain Reported-by: kernel test robot Closes: https://lore.kernel.org/all/202306161533.4YDmL22b-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Peng Fan --- 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 b6c7c2725906c574..44f435103c65a8ee 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 *p= dev) anatop_base =3D devm_of_iomap(dev, np, 0, NULL); of_node_put(np); if (WARN_ON(IS_ERR(anatop_base))) { - ret =3D PTR_ERR(base); + ret =3D PTR_ERR(anatop_base); goto unregister_hws; } =20 --=20 2.34.1