Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp877189rwi; Wed, 19 Oct 2022 04:12:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BvM+u8Wi9QEwHY04YXPVDb534S/iiCT0TKbZBr2aCu8u5rv56HcZUnApxL4IPtsrWszU4 X-Received: by 2002:a17:902:ced2:b0:17f:5eb2:cd72 with SMTP id d18-20020a170902ced200b0017f5eb2cd72mr7836414plg.162.1666177957500; Wed, 19 Oct 2022 04:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177957; cv=none; d=google.com; s=arc-20160816; b=pSs8CWen2coW2oEX1CciY4eD3MVc+lNgydPEgzL0n/o42ww22Y4MtstH+V2BTtqm+5 G9H6+T4d6ZmVc+VJEpP/nLH6sBV9pSSIw2PujQXBQ4bDgDMT5Kw2HBsXQiPVCsg3hPq5 PeKPQieTIVlfTaHB8kMgyqqHYTdOjyF0oNwhzuncDmkhigoik8Nqutcjyg/iRj5H5IsL NM3y8RcD7ci+CQBKrzqb/FKE7q3lfAHMjs7Cp98iKxJav6JT3XQY5kHN5wWgyR7a9YL+ gQQambnQKX61zMRysjaz0XDmYGcrDjL6V6VjCf2FtgPNN8KPYal6p7vw56RDuT0Aczc8 PVtA== 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=jsEfyFQKirU94htMd9BNVsMLlD45vinhDMQosHu/5eY=; b=SPk1EMm4gMxuXmkmpwpLDVJyrKdJXyXgz7vJIcqWpbMy/TYJY+9juZAkYQVfyOFc5B 6FsT4elRpMaFxDGhyrXJNgA7sLmMNCxE2Ox3ICMLYacib6pVTMVOnXqiFK/e3DW0Gcoj +wEPmQlw5JHK+pEZkQ1lUv5bX+V7jW5pyhhGzYo4L6+4ExZF/Z0vlE/N17Ocn+fcwfc0 GTpHtLqXzaXlnl0dB6L95Ui0tTj+y2qTL1bcvdpc4Iz8OMueD9J62gorvYCkndKtnSuk nHduop47LSo9XhjtcUcvtY5fPlAzEpybUdm/vQxXC8jMWwjr7S5H4RJzMIQVpsxC/Sia AlYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yMnP96cb; 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 d16-20020a056a0010d000b0053f52794b23si20240309pfu.88.2022.10.19.04.12.25; Wed, 19 Oct 2022 04:12:37 -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=yMnP96cb; 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 S231959AbiJSKtx (ORCPT + 99 others); Wed, 19 Oct 2022 06:49:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233513AbiJSKrE (ORCPT ); Wed, 19 Oct 2022 06:47:04 -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 59C3E18380; Wed, 19 Oct 2022 03:21:43 -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 3F991B82444; Wed, 19 Oct 2022 08:59:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC3FFC433C1; Wed, 19 Oct 2022 08:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169967; bh=I9d031I2SDmf36pt9nJFhqyJf4Vp12w30552pTi83wQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yMnP96cbx7bvaR2UOr8P5eIw/VszF8L4QhuCtYZeK0cSPH4teg5ShgiYh9+Aya/nn aBqKnrxG8tDkqE4tZcd3A9dPq3fNvqm/LjmVUmkzM4PFNd+2us2kquJ4fASE26Safn 2j40yUIvlfzzmbmb+4ix9JXYfNI1CS9x3djVtSRk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Stephen Boyd , Sasha Levin Subject: [PATCH 6.0 475/862] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Wed, 19 Oct 2022 10:29:22 +0200 Message-Id: <20221019083310.941218380@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 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 56c78cb1f00a9dde8cd762131ce8f4c5eb046fbb ] of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 6b301a059eb2 ("clk: tegra: Add support for Tegra210 clocks") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220523142608.65074-1-linmq006@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/tegra/clk-tegra210.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c index b9099012dc7b..499f999e91e1 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3748,6 +3748,7 @@ static void __init tegra210_clock_init(struct device_node *np) } pmc_base = of_iomap(node, 0); + of_node_put(node); if (!pmc_base) { pr_err("Can't map pmc registers\n"); WARN_ON(1); -- 2.35.1