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 509D0C43334 for ; Wed, 6 Jul 2022 01:02:28 +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:Message-ID:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QN2SBvIodB7dDVuyjqG77voaySHgFQHNsmSOGlGucY8=; b=2A/v0NxJqP6pdk iGzdlxG5qdVHHwwacSXOfhnTp34NIZA+z+zFxyaY94N6X30+01nZcwmK6sP/PqLRGQVHUV2TM0rPg pwnJdcrl2u0wPF84RfpYsUD8fh/EGgF9xP6/g3UTi5W2sNePlGyBgUjOPgC3WIR55v6wFw7Dh9Z9O wdCKKNAVoxI2wOAnCBkvwUpEYyQDpgV6S+3BKr/7tuHbR9mHWUQnutUa7NvUiG5g6NyBapxv9LKNK ls15V1lo5hWRFNqfrv+WNgmkix4tlWTj7PhXqBINyKUeFxx0qAtm1dDOkElTJd1kdGnJld2W+MoFt pIwy2Y9ZdkFCM9UmUVAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8tOs-005BNL-Ci; Wed, 06 Jul 2022 01:00:18 +0000 Received: from [220.181.15.1] (helo=m151.mail.126.com) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8tOo-005BM1-Cd for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 01:00:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=vWWgM LDzPjXq3dyNLMynAXp4UYaw+AiYKQ99QuGQt0s=; b=oA4UVNWNViXVsldGji1ij fyWwdGxZjJjOyvHCHLsjaphgUK2rAl4fg48KNTIZ7l18poUlPJTVA0EFeOk6IeWd hCJUR9BleHCtG2eCfeWUNfGsuQyruVcCpF0JqL/Am6G5sig6SdEGRtCJt0a9a2gh 94c9Yk3bCmPuy5vJE8Ny+4= Received: from windhl$126.com ( [124.16.139.61] ) by ajax-webmail-wmsvr1 (Coremail) ; Wed, 6 Jul 2022 08:59:07 +0800 (CST) X-Originating-IP: [124.16.139.61] Date: Wed, 6 Jul 2022 08:59:07 +0800 (CST) From: "Liang He" To: "Arnd Bergmann" Cc: "Florian Fainelli" , bcm-kernel-feedback-list , "Linux ARM" Subject: Re:Re: Re: [PATCH] soc: brcmstb: pm: Add of_node_put() when the iteration breaks X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20220113(9671e152) Copyright (c) 2002-2022 www.mailtech.cn 126com In-Reply-To: References: <20220705112815.282835-1-windhl@126.com> <3a9f0155.76e4.181ce4c0cb0.Coremail.windhl@126.com> MIME-Version: 1.0 Message-ID: <4922d10b.47c.181d1049683.Coremail.windhl@126.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: AcqowAAXKbFc3sRitGEfAA--.36070W X-CM-SenderInfo: hzlqvxbo6rjloofrz/xtbBGgQ1F1-HZcW-+QABsD X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_180014_832279_2FF0155B X-CRM114-Status: UNSURE ( 7.49 ) X-CRM114-Notice: Please train this message. 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org At 2022-07-05 21:09:19, "Arnd Bergmann" wrote: >On Tue, Jul 5, 2022 at 2:18 PM Liang He wrote: >> At 2022-07-05 19:54:05, "Arnd Bergmann" wrote: >> >> Thanks very much for your reply and your advice. >> >> I would like to give more useful patching work, but now I have only learned >> the 'device_node' related OF APIs. >> >> It will be easies if you could provide a special case to teach me how to patch >> of_io_xx related bugs or just a related link in lore.kernel.org. > >The general rule is that for anything that happens in the probe() function, >you have to negate what happened in case the probe function fails. >If you look at drivers/soc/bcm/brcmstb/pm/pm-mips.c, you find that >its probe function has an iounmap() for each ioremap(). > >Alternatively, you can also use 'devm_*()' functions that do an >automatic cleanup when a probe function fails, or when the >remove function returns (which this driver does not have). > > Arnd Thanks, I will try it. Liang _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel