Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2694037rwd; Sun, 28 May 2023 22:23:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bwuDHp/tupdaavrNkPy0Po/BHcNv8CYcIYBldjqk5qcP8AmwsV5Hg72WEXtES+O4nV5gn X-Received: by 2002:a05:6a00:14d1:b0:64d:2365:fbab with SMTP id w17-20020a056a0014d100b0064d2365fbabmr8114873pfu.4.1685337795900; Sun, 28 May 2023 22:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685337795; cv=none; d=google.com; s=arc-20160816; b=I9uOIDnbJEb8zs+hde+8zC/HnARa+U8GC0vK9wCvpMjxlMkvHGNaW42mtMVeq4M8b/ /j1iMVlzG3e66qAhOLvkN6s6f32mfRe7w6JiiuXYdxx1UTT/Z6XzLuIxdpgKCiOO/21x GEahddKQVZh71uDnaou2E9WfEPorMQ/tlypSJNRpxShH3vXb8wEUXzZXcVfzA2TT4C/5 m85SLsBOA627hHySLTNGQXzYfcjzpCo+QjNqYfimLsKTo6Na8Ro1FS/zMWnlfWMnI/EO s8vpkKMKKatevkNAxIPoCZqeYLEo0WEDwU1CSYAdDzYbNEggaga82yZcX8nYNclB5Fee FCew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ZjQTskCBzakKPJ3a6FQHUxX5VbY+NkuMLmAglFbnzmA=; b=R6ZYOoScWvlke9uwBnyzrnNQ1s7UMCBcXqO8Aq5hnbot8A5d4saKwosmRQhXvkxxXI tB++q+11g/md+dtnKt7mMZy8mZORnHhOLFT1aW5ATUOski2224bC8Dt64ka7li46Rjar TzJqYInsITCV08yEMe9qzYVfC0huPgl7zJb4iEEyUGxDrgZKnZjjSa6ZJLObp52k5Ls0 DbIHz0Y0HtYDOAQIS3I7M07ch+npNdbSMgPqhNEE7yu5EeiKPvmp6molbuWNbiskOq8x xejZpKkkqg6sc3wqeVJGIiYGnSA3hqesPFTpXUZZfeV3v4fjJU2mZIyGVA2l3raFGslb tgZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 205-20020a6219d6000000b006467de1cbc8si9037466pfz.226.2023.05.28.22.23.04; Sun, 28 May 2023 22:23:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230318AbjE2FIS (ORCPT + 99 others); Mon, 29 May 2023 01:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbjE2FIR (ORCPT ); Mon, 29 May 2023 01:08:17 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E59B83; Sun, 28 May 2023 22:08:13 -0700 (PDT) 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 Content-Type: multipart/signed; boundary="nextPart7679923.EvYhyI6sBW"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-FEAS-AUTH-USER: kaima@hust.edu.cn X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--