Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp891148rwi; Wed, 19 Oct 2022 04:23:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pjAqST61fKjV5LJIom6H9fg3RrgzaAkvlY2W6V9NbdL3lmGFkBTddBA0ashXjjhN368lW X-Received: by 2002:a17:907:75e5:b0:78d:95d3:255d with SMTP id jz5-20020a17090775e500b0078d95d3255dmr5951863ejc.495.1666178598664; Wed, 19 Oct 2022 04:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178598; cv=none; d=google.com; s=arc-20160816; b=ucWccHIHbaZ8MXpUUnB8EBxVbNgAclQ7aEUi9CMPhzbUfZQAt/pVt/GAbol5vuyrag R1t+su3KJQEVM8ObPNKup+7wSq/Hq6nmimnpKZYY0Ox7CaKJ83xgp0ZSm/uskeSuwJDI 7NoLphPMeSqw3SWmf3QuGSYsFOgK7M1VozVxTIbt5e8d6K24UvtlokOAbZSym+hw3Q9E +/+8FoGMZnuPdbJuNFJ9b0cS6w1k1owFcQ0k5Z4DnXDVSkiROM5j8BBI8FPcoLSpqCJh EVaht0D3GxhMuWGfAYsn74zRHewolKVtKTu7KOacGUXvDp9zV2FmY3r/pZy0bO6QBgpP Hudg== 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=TCifrgbVIhF6IG3IN/+rWiGab9iYhQuo/bM3ZkfqbCs=; b=PsgTGmz8ivlk1d6fPH6+sbTMpMFoACBGppCaTzRfZjnrWTRwQOo4+PG+fCYYOubqPc 3KeAByBizloG0gxcmlGBTMViZ/lUpEjALygDel4n9drDMf4zM8t7CuGvY8imDnS4Nkrs 9vUHB6iAWLG2eTOd+oVuXmq1eCoARWzF6xhscoYgCAEj/9UeQXB1j740n/oFQyvPf9Le C/xJZV8j2EypKblSm5wPS7naA/kfo7pUeXpaa1owkk+Y3+jJRzXc8RLbH1pej66tC0Tt UmE9Mbngl99L9EGN7sxkHgk7c2vh27eMG+FO9fFHVD6lxXBaypsnYYZ43ivk9pm63njL AyJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U6qLd305; 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 sc11-20020a1709078a0b00b0078de51e1c3dsi13857622ejc.840.2022.10.19.04.22.51; Wed, 19 Oct 2022 04:23:18 -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=U6qLd305; 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 S233979AbiJSLJB (ORCPT + 99 others); Wed, 19 Oct 2022 07:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232405AbiJSLI2 (ORCPT ); Wed, 19 Oct 2022 07:08:28 -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 BA2BDF5CE8; Wed, 19 Oct 2022 03:37:07 -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 8B6D9B82448; Wed, 19 Oct 2022 08:59:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E10A1C433D6; Wed, 19 Oct 2022 08:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169972; bh=jY5QCfw7xTXd3ZKXFT3BA0Dy8YBjTPowLa9k7IVWMjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6qLd305VxxzEhr+1OUpWVItms4d04DaUTeDHkUdNlMVdgnMzp2m8qircqERZzZYy wgZyQiueTFuX9//NpY35XDc9T5N3pX/dOZL9WA+XWboQEGWuHQVMSHg+IpTi+Sv/Lt S7gMVJ05eJyfXQRe/aJnZDSur2/QkCMWnfCsx2+4= 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 477/862] clk: tegra20: Fix refcount leak in tegra20_clock_init Date: Wed, 19 Oct 2022 10:29:24 +0200 Message-Id: <20221019083311.026012365@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 4e343bafe03ff68a62f48f8235cf98f2c685468b ] 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: 37c26a906527 ("clk: tegra: add clock support for Tegra20") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220523152811.19692-1-linmq006@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index be3c33441cfc..8a4514f6d503 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -1131,6 +1131,7 @@ static void __init tegra20_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"); BUG(); -- 2.35.1