Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2816395pxb; Mon, 18 Apr 2022 08:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0DLYRCwcpV+fZk7G5CI0Hn4mmdUPJXXueML+W+S4EtmsHGy3x8wZk7OEyYc2qeRo6q7qf X-Received: by 2002:a17:906:5811:b0:6e8:47dd:c55d with SMTP id m17-20020a170906581100b006e847ddc55dmr9648735ejq.191.1650296987515; Mon, 18 Apr 2022 08:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650296987; cv=none; d=google.com; s=arc-20160816; b=s3rPQyKE29xD/no7/AgmZBWHvb/WKDEP0WUXj6zdg7MNW5u6zotGpNFk+RmOMKn6V/ GljdGMG5QuOlX55gb5RuDFcVyR4yAuZ+BqgzHeTpAUNTdJJTaW7L2NMbdODv/zlieVE6 xAhTZaUGlaGSzDGZXmmcVRPNgwo0JsPQlkmthGxQPFCnNSP0ZMWQndRe0UlHUWZDa9WG T78Y2JvUOE35RLlJ4Hwl6Tti0z0ksbMQhrLA1ayv37E07MaaQ/nubMBmrbDeRPACBAQi aL4TFXx0yZ86GJ1HlvPB9fDAz8KKHC+wWsFug5bhaSBKnVSnQlvXXzntOGd+aDU+Dr4S +HTw== 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=adjYP0x2aivw1LFyH4eA5NRoh65YLSk0pkavdIFTh6Q=; b=rYPCpuqtQIwZFhqJp4hrBQEyMjeghJ7LsW3OnRJMHltG6PrUQ7Z/GGY7hOoj6uHhRn x87j+NTQqrt+6f8qjnG9VbchVjDqtn2kIIpKO5ns7ABx25ixoVVAKQNqATHryDrn4Pgd sgcLt517iTy7sSIFsNttUo/w99AcBUrz24gX4udr7dYdnjthgBmZ8azz1fCb65GCB3Ba dFYHT95l2d/tmZ7AnyDwf/c5eM3xQXCBtP62rg1lxdzpKnN8RCPYtyXaMyJWf0Fj85gx V4wl2Ye6PWe+Zqm+oBRC4eKgnDdpKtQuRlVEVvjNNbgUtBNbu0LE0BoI3syLKMtRJbuh Y25Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="r4/dD8Zn"; 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 bh26-20020a170906a0da00b006e897046cf6si6451030ejb.552.2022.04.18.08.49.23; Mon, 18 Apr 2022 08:49:47 -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="r4/dD8Zn"; 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 S245161AbiDRNwo (ORCPT + 99 others); Mon, 18 Apr 2022 09:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244239AbiDRNaN (ORCPT ); Mon, 18 Apr 2022 09:30:13 -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 69F0241625; Mon, 18 Apr 2022 05:54:18 -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 929F9B80D9C; Mon, 18 Apr 2022 12:54:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F02FAC385A7; Mon, 18 Apr 2022 12:54:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286455; bh=rk88CqsmYPt2GYpQNqnGaUUD5zAsEFFFkLN2OQiBwXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r4/dD8Znx6U2BMdteLRn8bURLpenbRhnrBfW9kHM7TFda5Auk6uQXO6MvRB9jnOf8 NJgxg1X3EvH+PDDWO0uQbP6mU6l7uSfxJmkkMRJr6EBF2u+5TaNZ/uozsVrpg3z9dG AjABn88qLryUzswvruNsEY3cjT5KAu0sIkAyYblE= 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 4.14 141/284] pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init Date: Mon, 18 Apr 2022 14:12:02 +0200 Message-Id: <20220418121215.483405255@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 3cf384f8b122..8b07439bb694 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1367,6 +1367,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) { @@ -1380,6 +1381,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