Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7426931rwi; Mon, 24 Oct 2022 14:37:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KnRwpdqUzZ5RhtZkTXkGjfHvYT7nOSzvANMF3TLTkU+XKN8eNHDQ0kVewlCMHE6IsBFRn X-Received: by 2002:a17:907:86a0:b0:78d:df8b:4d17 with SMTP id qa32-20020a17090786a000b0078ddf8b4d17mr29288777ejc.254.1666647422098; Mon, 24 Oct 2022 14:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666647422; cv=none; d=google.com; s=arc-20160816; b=vWDCXPcKKHIVQcVSYgh5D9CMuuyXNCW+v+Rbemg+j7vP2AFpwNxLfIX0NHQqNdNdXv lwVaRyDG6hNSj+Krcc/ceurnRwD3gInZ2vxx/N+3Dt1Ore9xaSzmB9/ZOpv6ABllviyq jOQryLB+8APrk5XSF3Wsk+vwk+H7wpPd1NAn4q8UIYVjplpAjZcH4T5YQXyvOPEsnSCu a/F9GQBNr+MMqzb1xMJZrOL4AHcF14ZYQboqq34jbqgimPS+hxYHMbDPan+Q8QWv7Vem OmsDBFadgvRvGTaLs50euzgjppitdOL7wpgDwoR+nFvQlQ1qCKq/Qvpdc0VQv7484cdp DcTw== 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=/p5Ujs2KqcyALA+Z97agTpQoh8vlr97IKoU55BAue1Y=; b=TJhBHqcGIqUOPW0GpBxkW8WUAXOC66LYM2Y7cGuEk9lQR3VHBIimO7rbNpekmiVPm5 ukLbEckzR/vP+5MkRADBXSyi2oCIDKWMRpva4cnk960orU3raXkq8qKFmgXx4zZEsN3C H5Yd4l9N9NDTT2EcYvHUn2C0CsQcXeLEGH1uLbGqrnWTUFU+NR+zDpj5duqPzyMoLVYJ 7PYnP5INUfi2tYjSXHk8m445J8BhcBJV8D47Cob3PAH49fZZj1MRr21WRBGejeYEPMDo tcJAoy8/dFBXgNV+pSvSBbUWh30GqyPZi9NszykFAqcZkXcSwRDV+sXA7m18I4gLavlj cJqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QtYNq3b9; 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 n8-20020a05640205c800b004612220a97fsi981435edx.100.2022.10.24.14.36.36; Mon, 24 Oct 2022 14:37:02 -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=QtYNq3b9; 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 S234994AbiJXUmT (ORCPT + 99 others); Mon, 24 Oct 2022 16:42:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234880AbiJXUlT (ORCPT ); Mon, 24 Oct 2022 16:41:19 -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 7AB2AFFF96; Mon, 24 Oct 2022 11:50:42 -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 47996B815A3; Mon, 24 Oct 2022 12:11:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A399BC433D6; Mon, 24 Oct 2022 12:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613490; bh=67SwH3yl/AFIQ+5gVJObOOoTwx5eMWWZ5Rp5oyWalPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QtYNq3b9lNBsVKOdUkng1Ib9nzBAEw6sEh5Y5ildhnEzKl6JEGcrZRfySzEJLv573 57bQX6aAfdmPVZVaTaVrukLqQDuhKFhtoONujA03nwtcrFVAbV0BysBz5wx9Ny4p0Z xzJdPpppDR+uQniwhhK3I1vgAmxsqYOhmRqjPygM= 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 126/255] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Mon, 24 Oct 2022 13:30:36 +0200 Message-Id: <20221024113006.754561168@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 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 df172d5772d7..34155b5b994d 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3523,6 +3523,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