Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7444393rwi; Mon, 24 Oct 2022 14:56:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KKUxsHXTV8KV8EnAlh3+MYsMfvhlMTwO1pJxPTpTxMsUCMwBpOAAL2ZYUGSMS0dTw/BwY X-Received: by 2002:a17:902:e552:b0:179:e795:71c5 with SMTP id n18-20020a170902e55200b00179e79571c5mr35333729plf.57.1666648571195; Mon, 24 Oct 2022 14:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666648571; cv=none; d=google.com; s=arc-20160816; b=UCYjaCl+SxP5gbYDZV3YW6UB9hma/uQc7rE6Z9sfKB8tBSmvtpeiouFYAyF/47W0iV g0LtWCb9Bj2+MvCBt7zxO+TBRBTUOLp6dcOZyCIFQiiC0xBadZRFZgUIgobrGtlgm6CB KIOCehSL64tfIz83KStKHbpSMLrsrNOachUmU63MpsPQX7AtFMiqpC/afzONvXlideQ6 B7XB+igaz1034Pox2lsA+dXaUQRKWYXJbYbxvwdZTjUxv1MJLyx1pEF+Y6hn7Q5bxRRH Zjitb8fyhZrNlGvh6HsfY82zlPwMxhJBOMY9+pNnTqhVreR9DVi13wGdT0g53Lnpo8u/ ziIQ== 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=YGeIBcUd3yBl9/FNZqKup1uj5yTA3qIeFtsyUz+trpc=; b=ylawTLJiuACB6tWAdH0CkLaA3jlF8uRF+EE/oYJ3yEd3Flx7wFHfShYzVKWbWzW34g gum+a1+0ZrIPGVEslYo71X9vtNJKvZPztCJtMB/ImCLctC+AfbnhNwINQDZyR10hcr/x SH+q6JbZeMfKzUpTHcMTLrmmQK2WGYSVRcpU+eEop5DUYWoNMBSNO06O1ZrY0b6OfuBs qVO3TUzBycmZLqfuR2J1brIatBrww1iEBBBSTxVyzb6Wbyab6o4Q93GkaA8FTpYgHohD R1EwkcrmsdEET8GR+s6exUdA7r+xr6pqGLMYeq+vvikjwLf0OhyJRMjbY155lhNF+/zv zHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sQ3aipQv; 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 f15-20020a170902ce8f00b001853a1fddecsi762993plg.403.2022.10.24.14.55.59; Mon, 24 Oct 2022 14:56:11 -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=sQ3aipQv; 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 S230254AbiJXVrP (ORCPT + 99 others); Mon, 24 Oct 2022 17:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231310AbiJXVqo (ORCPT ); Mon, 24 Oct 2022 17:46:44 -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 9C0871645E0; Mon, 24 Oct 2022 12:58:24 -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 73E0EB815DB; Mon, 24 Oct 2022 12:11:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5483C433D6; Mon, 24 Oct 2022 12:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613495; bh=zmM+aWSIdZtCALQFVN2TXHaxzhsuDCKBlpj+0+xeCj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sQ3aipQvubB+baSLWbNwIxNqNQjRGXC9rEiJfTx640qVguP/BGoUYMVBVluhl9Kzk GOHExgQ7W3wEDH22cGnRNN8tJ+m5vo5H1WwZOlu4El7WosynmP91LKs4nRPurump0V FNx+im5JK6/ZO+iu3p2tMTb6ZKUNTvV2y4yiMzI4= 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 5.4 128/255] clk: tegra20: Fix refcount leak in tegra20_clock_init Date: Mon, 24 Oct 2022 13:30:38 +0200 Message-Id: <20221024113006.830046182@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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.6 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 bcd871134f45..3e0f04f0e16e 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -1151,6 +1151,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