Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp680469pxb; Tue, 5 Apr 2022 18:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk5yScTh9nRLQOI3awCpenxRlTMGABUTVLJglat24Gr5iO3MacMYLDmhznlbmCXnyFWiKI X-Received: by 2002:a17:907:8a1c:b0:6df:ecd6:b6ea with SMTP id sc28-20020a1709078a1c00b006dfecd6b6eamr6008903ejc.530.1649208657997; Tue, 05 Apr 2022 18:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208657; cv=none; d=google.com; s=arc-20160816; b=ezcAMODgLxH7zcVbakWz2V55ihU19EJKJyfc2826nf44Oaf6/MbT4MT5SrcYCq+PJy anV+iKTjmSzO5AK2PmEKVoul9kWfCT0Zn/yWb+Vdsa2dGJm5N1hneTR5C8Wb3emqWQf/ 7HVEOJahzce7md84fQ3avLWspUaFJowE1YP87VOmHjGwpd5IQ6X5Xmeya3UePp0gtWZJ eiRXHOH7ubmwERstQIrijQgK9QRoR78Q8jxIIcaS90pD0NkHBc/weSRJeQNdy6RYVOX1 YNK4FtnWsssZhLIRNPfxiwaUhSzUNtesGcVjiqExYOjwlU4nWRPW8mOCCOZDdMN8iXQs gMHQ== 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=NsauKEGP8/hwmgPw5tnxpD4tI08gxW5iixHBpqFpeoUC9hGBS6gBrZxdboDKy2Qwbz W5i9uhvL143q410TYI3p9q9/L4msT190dKJxxGdh5RtERKGbaEtHYYbc8vs66e/6SbpY ffMd0D2C0kNqAzc6db0EmIAnqgozlXNCgj2Rd7+1zxms56l/jTCkVg56MHro6HKb9aCi GYObH6h2W86X5mkivmoaV2LNL6YRV6lDcYQb8CRwWTd+LtZluIICYuG/FGNTEtWDKXW/ dsFr/Z7iZfri3TLJqZfReEi6Dq6+HVRe/9KLK0WrqNzuyH7ZsGRpQK7jpd0ifRyZsF9t 9HrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N4l6hm4m; 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 q15-20020a056402518f00b00418c2b5bdd1si11000091edd.179.2022.04.05.18.30.26; Tue, 05 Apr 2022 18:30:57 -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=N4l6hm4m; 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 S239568AbiDEJdo (ORCPT + 99 others); Tue, 5 Apr 2022 05:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239484AbiDEIUH (ORCPT ); Tue, 5 Apr 2022 04:20:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF616986DA; Tue, 5 Apr 2022 01:14:12 -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 ams.source.kernel.org (Postfix) with ESMTPS id E8777B81B90; Tue, 5 Apr 2022 08:14:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56C62C385A0; Tue, 5 Apr 2022 08:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146449; bh=HF9ZRoT/tkCsXNkCLwa2Fgwjnyr+EaDHb18MxA69YD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N4l6hm4mXy1KKFVqJzNoOFd9dfVXpiIk904vjDvlRdQK7WdhkFGBqicxK/qK1bGAj xWoeVoT+Q6a4Nw7K73Nwoc8QlHmHEfgfTky0cDiJhGHt3CN1ajlBgsdWaL3HCJt9B0 Cjl5ZiB6qVzxassrq2WkcknLTMn/DVAEkn8skb4I= 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.17 0769/1126] pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init Date: Tue, 5 Apr 2022 09:25:16 +0200 Message-Id: <20220405070430.153831300@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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