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 75588C52D7C for ; Fri, 23 Aug 2024 10:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:Cc: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=+FlFQ9W3aFSvGgRgzhH/suTQ4ZoLYUscTAd93Wv0Jtk=; b=j5ygokZN0g8B0uCOKjw2UJnI8D JeXebxEBGkZgDNtnp29M2p+mN28TohCRBMUEXJJwG+KBUmCvov+2134n55E1KGOG6dtZrDfjFX9pU /HAqnELD+mViUcnjKGmoRHYkRsU+Ds2V1hyrBkispYoeqGmd3TE+F4Uh95rKBWRcS0cId2meTCqFy dOxPxYZZEg3WXwXuMFZzJQ3mmaDvarluVX3t48uz55tZDwfkWrUE09QEFZoC8VHF983/8bwiNedT5 WCcP6ycvgK2KzF6Un5qFU2yEKkXFEd1zmkhOVGY3VSg5sdH1tTy8qko7MAP2mS8FA/6Dli43ErHLk IXW7G1kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRzU-0000000GSFq-1A01; Fri, 23 Aug 2024 10:58:00 +0000 Received: from mail-m32110.qiye.163.com ([220.197.32.110]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRuV-0000000GR7s-3jbU; Fri, 23 Aug 2024 10:52:53 +0000 DKIM-Signature: a=rsa-sha256; b=OMnh+gH1pqoLDJG1/RyMtivsZe7uz4d40xO9C7VjyTQFMkdaTXKx98SHxhxJRrmcAYUDYfUcMtgCL5fvKhQak/yH3iYsHdnnfVaUnc6HSxwO+rn4lrJG7D8KhJRR9PJDUr7IRPe8VC6TaWsWKmYgtbNJJPaPQp41+wSHtj2ZgBA=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=+FlFQ9W3aFSvGgRgzhH/suTQ4ZoLYUscTAd93Wv0Jtk=; h=date:mime-version:subject:message-id:from; Received: from [172.16.12.45] (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTPA id B1647460200; Fri, 23 Aug 2024 18:52:28 +0800 (CST) Message-ID: <70b6e321-0b8d-4dd1-b098-4cb6a0f83f93@rock-chips.com> Date: Fri, 23 Aug 2024 18:52:29 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: shawn.lin@rock-chips.com, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, tao.huang@rock-chips.com, finley.xiao@rock-chips.com, tim.chen@rock-chips.com, elaine.zhang@rock-chips.com Subject: Re: [PATCH v2] gpio: rockchip: release reference to device node To: Ye Zhang , linus.walleij@linaro.org, brgl@bgdev.pl, heiko@sntech.de, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240823034314.62305-1-ye.zhang@rock-chips.com> <20240823034314.62305-3-ye.zhang@rock-chips.com> Content-Language: en-GB From: Shawn Lin In-Reply-To: <20240823034314.62305-3-ye.zhang@rock-chips.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZQhoZT1ZJGUJLT0MeGkgYHR1WFRQJFh oXVRMBExYaEhckFA4PWVdZGBILWUFZTkNVSUlVTFVKSk9ZV1kWGg8SFR0UWUFZT0tIVUpLSUhCSE NVSktLVUpCS0tZBg++ X-HM-Tid: 0a917eddc7ec03aekunmb1647460200 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PzI6MRw4MjI2LCIfTig6Ax0I LS9PCUlVSlVKTElPT0pLSE9CQk1JVTMWGhIXVQgTGgwVVRcSFTsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUlMTkI3Bg++ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_035252_181204_AEAD9C7D X-CRM114-Status: GOOD ( 12.37 ) 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 在 2024/8/23 11:43, Ye Zhang 写道: > Added a call to of_node_put(pctlnp) in rockchip_gpio_probe to properly > release the reference to the device node, improving memory management > and preventing potential leaks. > > Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") > Signed-off-by: Ye Zhang Reviewed-by: Shawn Lin > --- > drivers/gpio/gpio-rockchip.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c > index 712258224eb3..5f60162baaeb 100644 > --- a/drivers/gpio/gpio-rockchip.c > +++ b/drivers/gpio/gpio-rockchip.c > @@ -715,6 +715,7 @@ static int rockchip_gpio_probe(struct platform_device *pdev) > return -ENODEV; > > pctldev = of_pinctrl_get(pctlnp); > + of_node_put(pctlnp); > if (!pctldev) > return -EPROBE_DEFER; >