From mboxrd@z Thu Jan 1 00:00:00 1970 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 CC356C7EE23 for ; Mon, 29 May 2023 04:57:20 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UXUc9qGBQjzq61DBgRPR2GJ34KRwrKKDnMjv4/rQe9Q=; b=XwwHbiUtHZ1SAU+Zy2qef03cG0 3GxLx//TcrnmiPiqFD1HaFGNeXFGwMGlYVrM3RMUo3hZ7j1c7MDs9AYEfWPpthBAKr5ofdQO038qX nF2s1FR7mhMjzxWthVWqVQyso/B7Zz9C20bYXxPkVfxthl65hPfjjxQQnAGYulP/19YpImDerxb5T pHn6EIaEySErEAQwB9oiroE3JzWpbqSEJQLDpkuvU+ac9m/nLItkH+uRZjjHA19A3HMopEpjYYqmk k1OBz0K4FlLHesanzAIZ26kuAyGhmgdamht7xNOFt0KEHjYqJZCYafr8eZQnCvWpadgNNXUa5+RNW HOmNP32Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q3Uvy-0099ky-2X; Mon, 29 May 2023 04:56:42 +0000 Received: from [202.114.0.240] (helo=hust.edu.cn) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q3Uvl-0099h3-0A for linux-arm-kernel@lists.infradead.org; Mon, 29 May 2023 04:56:41 +0000 Received: from sophie-lab.localnet ([172.16.0.254]) (user=kaima@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 34T4t7pt020146-34T4t7pu020146 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 May 2023 12:55:07 +0800 From: Kai Ma To: Stephen Boyd , NXP Linux Team Cc: Abel Vesa , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jesse Taube , hust-os-kernel-patches@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Abel Vesa Subject: Re: [PATCH] clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe Date: Mon, 29 May 2023 12:55:07 +0800 Message-ID: <22043583.EfDdHjke4D@sophie-lab> In-Reply-To: References: <20230418113451.151312-1-kaima@hust.edu.cn> MIME-Version: 1.0 X-FEAS-AUTH-USER: kaima@hust.edu.cn X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230528_215629_484408_FD213FD0 X-CRM114-Status: GOOD ( 15.45 ) 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: , Content-Type: multipart/mixed; boundary="===============1931805833678696777==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1931805833678696777== Content-Type: multipart/signed; boundary="nextPart7679923.EvYhyI6sBW"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart7679923.EvYhyI6sBW Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Kai Ma Date: Mon, 29 May 2023 12:55:07 +0800 Message-ID: <22043583.EfDdHjke4D@sophie-lab> In-Reply-To: MIME-Version: 1.0 On Thursday, May 18, 2023 6:34:38 PM CST Abel Vesa wrote: > On 23-04-18 11:34:51, Kai Ma wrote: > > Use devm_of_iomap() instead of of_iomap() to automatically > > handle the unused ioremap region. If any error occurs, regions allocated by > > kzalloc() will leak, but using devm_kzalloc() instead will automatically > > free the memory using devm_kfree(). > > > > Also, fix error handling of hws by adding unregister_hws label, which > > unregisters remaining hws when iomap failed. > > > > Fixes: 7154b046d8f3 ("clk: imx: Add initial support for i.MXRT1050 clock driver") > > Signed-off-by: Kai Ma > > Reviewed-by: Abel Vesa > > Stephen, can you apply this through clk-fixes? > Thanks for your review, I am glad to let you know that I am a student at a university and we collaborate to contribute to the Linux kernel. Here we have some similar patches for clk. Could you please take care of them? [1] https://lore.kernel.org/linux-arm-kernel/DU0PR04MB9417B63DE97D4A2A77B4176C88969@DU0PR04MB9417.eurprd04.prod.outlook.com/T/ [2] https://lore.kernel.org/linux-arm-kernel/20230503070607.2462-1-lyx2022@hust.edu.cn/T/ [3] https://lore.kernel.org/linux-arm-kernel/dc0f2863-d5d5-5102-eb8e-ceea92c03fda@oss.nxp.com/ [4] https://lore.kernel.org/linux-arm-kernel/9a2ab7ec-07ee-255f-a143-9b6c8df7c1e2@gmail.com/ Thank you very much! Regards, Kai Ma --nextPart7679923.EvYhyI6sBW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEOL4x3UcITzqVpkF5dHxtpLztq4UFAmR0MCsACgkQdHxtpLzt q4UphAgAnrurl7BzADxMZ3h8kBcriFp9uk4EAUxcpokix8jD7dp9y6SBJsckqVTG KWGX5guMpVJ44+vClDOJVcT+odTlO5/I2f+ckamSCp2xdTFPZ/TEjpZTfbHI2csL rXD/h/5dbZ4MjGbngWrkq+teS6LqMYuofyosEV9wBpe85bMpfqy1ti5wGQJH2Kzg 0BSyGYi6obWDsPu05HLaBiwVQY5EJJX3ss7QW0ErtQOajGbRTqW3A+SUluUrvFUg 7uRNmox67KDcgkA07BFWZ/IkrFsv/4E3DLR98B9oOq/DTqHEGz+g9pB7T14PhR2u PTyXpcPtzqGoTaTzjcs22grJt2TsGw== =CDQ6 -----END PGP SIGNATURE----- --nextPart7679923.EvYhyI6sBW-- --===============1931805833678696777== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1931805833678696777==--