Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7400808rwi; Mon, 24 Oct 2022 14:11:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xXmhjW56S8uTtU07lTVjhcaHqLhv138IbNjQA7e6P1TvO//vaQTNeD60fhaE7Hlvauwl3 X-Received: by 2002:a63:5422:0:b0:466:41b5:77d4 with SMTP id i34-20020a635422000000b0046641b577d4mr28893038pgb.547.1666645866514; Mon, 24 Oct 2022 14:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666645866; cv=none; d=google.com; s=arc-20160816; b=vq61HfM4oKe/blZs2eDf/rEn39hoYggbMe4/ux1pqnjMv6FckiMQveQpcWs2je5SC9 zyqyXkSgN7qnuH2515E9Q6jyRF6YcRNX45Mdec6mamEW2OFX38VNOoxxI/QFD83A6+ul iGSfSslXsosgFCMiq8kKGV8HY34yIrbDn2nK31BD05rPP9IllutxRz+BZNsGrOS6WjWq /Lv3ItphT+s2t7ORFQ32zUbm+HVfjGzngnccT5iQE7v0FAz6CA5sbLSHWfgJ2Cyd19ML FLrqk8lB8JOXeZ5gl3AtBol9Kuy9UAtU1HpcnHSf8X/NaV5TSJonGi9VxDYbgoyATgLu Vbmg== 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=ANtJE1VSNF7gSaxBl5fyv7LHdfs3Zw14u9lLMnqOeXU=; b=A7uCVBKXvRptUJH30GBGbAVOZKbbN+xLLJ6QtDUuOGl6LTPie4xNdDB9id60Q4pFFZ v/lu+KVZJ3MmJGyJEmSz1wYPMuqPMywIkKAHrsuMw1e+zi5COpZWDWElGMKuN/x2bCzw W+xeEpWsXXG4lDnXXIf1Gi9Kv+k4VYw9SuxjiJe9tmNAEko6gQphlZ8CLnF7CWOe2bw7 TGQpuDyqmRgnsNgVJomjva6sWh/xAiWmLPpBKXxZa7LnHlRG3aGmO9m2aU/CoREiFUOw OOrkHU0d2rJzyFuqG/c2AvRFuxOb7BJbU53bJEzDkbS8sx7bnifbfHVawtf06NW6TnCC bQIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AV8cy3V1; 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 y20-20020a170902ed5400b001729146e418si493551plb.388.2022.10.24.14.10.54; Mon, 24 Oct 2022 14:11:06 -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=AV8cy3V1; 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 S235124AbiJXUyx (ORCPT + 99 others); Mon, 24 Oct 2022 16:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235272AbiJXUxw (ORCPT ); Mon, 24 Oct 2022 16:53:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6D8E168E56; Mon, 24 Oct 2022 12:00:31 -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 dfw.source.kernel.org (Postfix) with ESMTPS id C8BD4612C5; Mon, 24 Oct 2022 12:01:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9F5EC433C1; Mon, 24 Oct 2022 12:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612883; bh=8ggShBhGOJwKpgRbOmOgbcjHdyJf4iISNtbQntcg8Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AV8cy3V1Hs9cGE1JEJGidht2aydcztQ4VlriWhXA0Cf86PFJlUJ+JRqyyYvL+cYCs WrJE4KA/ewg88X3KSan6jdIxhTB5QJuCsWeH72mPb4ZkxJFR9KsPUsXPqELjf4vhnz fMJ30HMmjQXlW0Hxsl5epxiBKAwM9yOJYi8geLKE= 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 4.19 124/229] clk: tegra: Fix refcount leak in tegra114_clock_init Date: Mon, 24 Oct 2022 13:30:43 +0200 Message-Id: <20221024113003.018607937@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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 db16a80c76ea395766913082b1e3f939dde29b2c ] 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: 2cb5efefd6f7 ("clk: tegra: Implement clocks for Tegra114") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220523143834.7587-1-linmq006@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/tegra/clk-tegra114.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c index 625d11091330..1e5025c127bd 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c @@ -1348,6 +1348,7 @@ static void __init tegra114_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