Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp954029pxb; Wed, 6 Apr 2022 05:13:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz07ECpNkRZpdfqFirtmIJsTQagEC8UVD96Ih0Mhkza3apapegfazsAkcONAaDfrLKBXbW3 X-Received: by 2002:a05:6a00:b87:b0:4fa:a79a:72e7 with SMTP id g7-20020a056a000b8700b004faa79a72e7mr8542565pfj.68.1649247203680; Wed, 06 Apr 2022 05:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649247203; cv=none; d=google.com; s=arc-20160816; b=y2jz18bqu01VjRnBUpowPPIDD4+ziZv54x866Y2bvpQDSBB1nMoNQyiKWEWCfqKGaY QFaeTHRjH5vL8W92L1qT79O+/EnGeUasHuG/1Bg2K4CxHvXDHtWS/ZVsv/BhEWiuEyc6 Zy6CEela5y5wkbu3c8k8gwCATvuGW/3JlXz8tRaHnUOx87Wk9WG0wOhj9EUoHGeJ6qUv cpXw7Qe60TkD5cVATdZ3cDu+FMtsB8GqyZ78vObkJpej4e5j4cMZuAy1gAETyeiif/G+ L/XAWCoAY4CR2c6hEFvtJ1w6LWZft7HopOYB2ilPZgPIt0j7OcMXk+PWAzV/icAoRqTZ P0WA== 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=qL6NZVSaeVxcQRj+Ycv2Xs0xrLhYSin8pmNHB0Dx+v8Yx4JX7Ae3e/p8TyXU5XbvIZ 2v/1n5dnjqEki0ck6DIVYCv15vrTebjSsg+DxjwZJpkpzSULRbwpW+pLCo/aOYSVl03Y zhm1zx0SDv3DKcJsXMRORslEkjeV7VO7U9KA+/uOyL0GyEVLEQu/YwDbORewWXx762eD cCcwGTU5YbUqtMuLMcOS7cPkAkj65azJPnGt0qjUvvJV3nPk8mM4vYMgc2Tf0l7Swfd/ wge7CW8uRwFptl4xj53tc1MVNLduerNq2EkKSITGMs1aBq5rT3kaUpI9P4aab6YikxeK m6Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNcD36po; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c18-20020a170903235200b00153b2d165aesi16674980plh.438.2022.04.06.05.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:13:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNcD36po; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CF9551131D; Wed, 6 Apr 2022 03:51:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382479AbiDEUl1 (ORCPT + 99 others); Tue, 5 Apr 2022 16:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349480AbiDEJtz (ORCPT ); Tue, 5 Apr 2022 05:49:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B5CF10DD; Tue, 5 Apr 2022 02:47:15 -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 EFDD1B817D3; Tue, 5 Apr 2022 09:47:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56BFCC385A3; Tue, 5 Apr 2022 09:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152032; bh=HF9ZRoT/tkCsXNkCLwa2Fgwjnyr+EaDHb18MxA69YD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fNcD36po7XV59sL4ouWXcuYqAB/kF880aeuQN/qwvmN+hq6jHqPJ/g/xHxU2OQ75m wrIPL0LhfWlwrwD1QeyKKs8MaCavCBok1vCqFwP7FYilfG6TrPZlfHvWlsaHe7NWgQ /qvciperm8B2X3Y5RMC5oJd4+Ag4NH74GHI4F+mk= 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.15 631/913] pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init Date: Tue, 5 Apr 2022 09:28:13 +0200 Message-Id: <20220405070358.753498053@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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