Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp651581pxb; Tue, 5 Apr 2022 17:21:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/Krxx/bQ6pqBQLVPyHKjsJpNCBYfayFaJhJpymqn3SX7A/6jbksj0xX/IQZ55krjGi6oi X-Received: by 2002:a17:906:698a:b0:6ce:b983:babf with SMTP id i10-20020a170906698a00b006ceb983babfmr6103580ejr.553.1649204503251; Tue, 05 Apr 2022 17:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649204503; cv=none; d=google.com; s=arc-20160816; b=qarFH/IcDpEWYskxtsfs7V/jswu0IwUKZFLLQpk+xXni695Xg4ZqKgbPy4YoDc98gt 807fcRtRbpg5/61lu20YGVK8F+UprCXG69uERlrYQK5BsbRQv6TrAC1W7+bSKA3Ju3ep lIoBc4RxdnKYMatQBg0hyY7lsXjoPJHJepa8OaO7ReP63ZotLTy4Q80t9tcZLSOP0HJ/ gsVHBHlprefWPBirKH5lSmJFKikbFBnPlLa+mex+N6MyP3sno/zeafoJteKNyvA+H2EX vHXpHADa0Z7C23a8ob9fC6whtM43AbIt1JcNiHQBGOHZ2b+KHopNP3QXhXGubRtShPjB n58Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=stRYDMgWpifLL8xtrW6MpXTfrU8g98MTJlZc5DhJVHY=; b=MWBskTSYvWrbIhKB2YHHl2ot7SJsDK8tuJUr77ZmPPVOYhs3Dt+o0QiX+NRszb75EC BRtq9ZXZ70JR9z4undhdn4vP0iRtLdB7EmTyMtvzs9/cFVbm4flPFn5nya7pVHRbpGIm n/Rfi1IiQV1opy6E2RTsO6zr3UqGMAhn30fj7UPH3zHPvJGfqhs1fcAH5LXYHvUrJRUl 1+IVl1hT4ms6HEWkTCkP+L0IMp9kzZ+qn6hrVlvvjD4lR31hCb0xzuTxDWP/4uQfhf8f aTJEw4z6Wl3ychAvpVdCT1aNKxZzDCPqiqXKMBUwtninDq/f3LkBtNBuT33gYE3nXefx vImA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lSu+eHRk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020a50e14d000000b00418c2b5bdefsi10278521edl.209.2022.04.05.17.21.11; Tue, 05 Apr 2022 17:21:43 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lSu+eHRk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349056AbiDENF4 (ORCPT + 99 others); Tue, 5 Apr 2022 09:05:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343985AbiDEJQo (ORCPT ); Tue, 5 Apr 2022 05:16:44 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93D02E4F; Tue, 5 Apr 2022 02:03:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0067CCE1BF8; Tue, 5 Apr 2022 09:03:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C560C385A0; Tue, 5 Apr 2022 09:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149387; bh=HF9ZRoT/tkCsXNkCLwa2Fgwjnyr+EaDHb18MxA69YD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lSu+eHRkl9Tw2lwefu8O0d/O8H1of0GkUhVkhj48vCyJIbQAUGm7Qd09VvVMei4F5 o03QQ3qLV5339mn5xPw6tdc0A3Zq+QXpMx8i7EUutDnbsJ8Xhqakwf17fbPIlIoIpC n6E/mgePkjxc24+6RIfFBBh1m1/wVCgLKlM2Y6Og= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , AngeloGioacchino Del Regno , Linus Walleij , Sasha Levin Subject: [PATCH 5.16 0696/1017] pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init Date: Tue, 5 Apr 2022 09:26:49 +0200 Message-Id: <20220405070414.932271484@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 From: Miaoqian Lin [ Upstream commit dab4df9ca919f59e5b9dd84385eaf34d4f20dbb0 ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: a6df410d420a ("pinctrl: mediatek: Add Pinctrl/GPIO driver for mt8135.") Signed-off-by: Miaoqian Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220308071155.21114-1-linmq006@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 5f7c421ab6e7..334cb85855a9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1038,6 +1038,7 @@ int mtk_pctrl_init(struct platform_device *pdev, node = of_parse_phandle(np, "mediatek,pctl-regmap", 0); if (node) { pctl->regmap1 = syscon_node_to_regmap(node); + of_node_put(node); if (IS_ERR(pctl->regmap1)) return PTR_ERR(pctl->regmap1); } else if (regmap) { @@ -1051,6 +1052,7 @@ int mtk_pctrl_init(struct platform_device *pdev, node = of_parse_phandle(np, "mediatek,pctl-regmap", 1); if (node) { pctl->regmap2 = syscon_node_to_regmap(node); + of_node_put(node); if (IS_ERR(pctl->regmap2)) return PTR_ERR(pctl->regmap2); } -- 2.34.1