From patchwork Tue Jun 13 20:12:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13279169 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 125E6EB64DA for ; Tue, 13 Jun 2023 20:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:Subject:References:Cc: To:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qdstUjetUhca/Ye0O9nWjaOJgiIH+M5ztfhmk5MEyAo=; b=MNfwBplTlBH2Jm iyOtF+Ddnto/EgfQXIBasz4vGGb7xUMQik98ldPHxR6JGYB5Pl4wGFo7gWAqQ68a2ylDes7Bligfk TEV+dMQ4Hr+5mSf36OlAJwUguPcmB5IBnTua1v+hVfe7upvO19J/SwhHl1uviLdUfTWC1IKG2A+H4 jpzKPm7gPgjWqcKhihUUtbyHXgBbEYebs83pk6Wa4Tvm+VMpdeXx1I4pweYX9L0z2CNUYSFZ7YsbZ pODalZZOapulykrR9XFMVx80Wk8wGPaC+tJEfM7NgQ/z8pdcW9+QfKRPV89LpMcMIs8SYO6Is4sHY 2GH9gh1xJkadgkgRbXTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9ANy-00944F-2F; Tue, 13 Jun 2023 20:13:02 +0000 Received: from mout.web.de ([217.72.192.78]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9ANr-00941Z-2Z for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2023 20:13:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1686687162; x=1687291962; i=markus.elfring@web.de; bh=EyW6S7JGnyaFI7AqEskScW2AasmCX45kbWOiDgIVsaA=; h=X-UI-Sender-Class:Date:To:Cc:References:Subject:From:In-Reply-To; b=wnw6zACgvYMRuv582ZVo7CznQG7prGSjhfBw99boUDSZAiDDSknSPfEwaLiIWh3q2OTGFUL MkGy3mTHJQwtSSEsTwxWDeTAmWLWZoEEtk0JUfCjr+XtonRVPOD8ephU4RxO5tKEdZdAMu9F1 zq540SGa4A/lEE9hyCDtVCShPcBb7Jqe2Vy4CU3PyoSG6ALFRyUylxHEanmj2uPzH+CKJ6hBZ ZGb8dMY9ObZvYI0BjB+0bFnJZe4paMtjMaS2QwppDmkOIo/GC7spfDCtoLDp6VR/Ld77BKTOn 6gMzEhVZVT77Gpt7u6mk+316++GKQqz9pXRk2VrnKc+bWLTtuV3Q== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.84.83]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MVJRl-1qbS623FTz-00SJHC; Tue, 13 Jun 2023 22:12:41 +0200 Message-ID: Date: Tue, 13 Jun 2023 22:12:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: kernel-janitors@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, kernel@pengutronix.de, Abel Vesa , Michael Turquette , Peng Fan , Sascha Hauer , Shawn Guo , Stephen Boyd , Zhanhao Hu Cc: LKML , cocci@inria.fr References: <20230601033825.336558-1-zero12113@hust.edu.cn> Subject: [PATCH] clk: imx93: Fix an error code assignment in imx93_clocks_probe() Content-Language: en-GB From: Markus Elfring In-Reply-To: <20230601033825.336558-1-zero12113@hust.edu.cn> X-Provags-ID: V03:K1:Vxi5b0bX3XtM7aSE30b/Ooalxa+P0rORHLYyAb6FkqjiwSvsi/h q6rHn0Xkskec2UhC560snPTMjcDWnd1BvhMkL4U7qWms3/NlKNwdevxpmPibAaz96vbOKJM Y+AgmF02ykyLpvNH85i/f0dTuLZzkwuFGTLFOeoCK3BvacZnrHH6EDpYw7mizvZeXK0ScXq Xs62kIs5Ht39bf5wcjh7g== UI-OutboundReport: notjunk:1;M01:P0:0ulTzr/17S8=;/AIQtiXwwLKEExMR0Lbk155vaM0 Z3GHn1sQgB1XdaXq/h4F5NmyZCunP5HP9yYOeqYqFZmfKZcXUcvPYWmfNQK+73jIfphfVUd+u g7WPv4YvN7voLrSzpKkg2JvPv6YAwQRGNOMchu7jAcH/b4dy3gpYmpdkbXVla+RsLRbsSE3u6 N1ZxDJ5LgHD/uEdwblCAdIbxhBXGwR/MZVMidhpmdUyEYm7YCXhvqWy37MfoGuk5jWDZRat9h Di4Q4qXaLRIkBNUG7l5VjfgpxDxQOpj1igIjiG00K/Du6N+5DTgqkxLY1eHsBXxgaHDeeiIZF w38+nRK3gaQfH6p9WTwUajZmAFA2fSIIAcZnDn6HNPCOo1frBqqQ3sUWvqbEaS/+87ZBGJ5jR X4ZTIOMPjThurRVw3yporDGM8YDeEIEpD1pVl3dciXqDJEUcoXgTDoLQc+94cm5grknuT0cm5 XzZXAOYiPExQc05sdHHX5+H/fvYFsyL1X/hygMfiFnsjJ4NBNny1kuXoI188za6+nprJM3AIS wAZsIAFJ01XLa6z5Xvtf+HH5WRZJyC8WB5ghP/ByFYi1QZqvcV7GiiXYjG795ZqQOoy/Deetv U074CMkCKy+MQjeQR+fpv0EWFIe9AZHZsgGK+igVPZOBDCsjtq5Mi0nLTYdIHXlH6HEpHb7bd o78Z1hDFNAwp4XHaK+ZNLNN6XxuKsdNlWSey41lwV7r0BlQ4OdybAoccd7r7PB9L4rHQAS0c5 wdjOpUrP4FclkKlOhPD5eNEu7s8vB094MsCH1nVN+BwfWe7FfEWm8u++HSPlmSUlkhlmqwmW9 NQR3y6LFCzSvzvd5ZpB0juOTD8qSr5BfNCXOzVVdCND3Y6OUMLgnPoqsbOwy9eWaGhiQIxruk 2RYulEN5Mkn6fafjSyqkS+ZhXBhRqENZLmujAX8I4LiMdGuQo6ajFZkqcl3QstbN1O5PvHH5i aZ7kmA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230613_131256_303541_20C3A819 X-CRM114-Status: GOOD ( 11.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Markus Elfring 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 Reviewed-by: Peng Fan --- drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.41.0 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; }