From patchwork Mon Oct 24 11:29:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp599506wru; Mon, 24 Oct 2022 11:46:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7U099YWRddCN3sQjSujkVyF/ih3oh4j+KiQuLMIz07v0Cs7mESOeozLCImaUjlhHLLnsiE X-Received: by 2002:a05:6a00:21ca:b0:569:92dc:2949 with SMTP id t10-20020a056a0021ca00b0056992dc2949mr22817707pfj.63.1666637160872; Mon, 24 Oct 2022 11:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666637160; cv=none; d=google.com; s=arc-20160816; b=z9JQcMxRIXZoJnLXU97MsXSez3MsMUExl3hRogqr7mpoOu2YJRk3DKk7RaXpc3n39E Tao1yFc864hHMH60DTDULZzegcDUx1Lsl45POMZ+9WhVpGTXk9H2+vw/CfWocbc0elta 6u+Uzu/3WjTdGu1OekDuByLKsBevE8kktk4SYDrRtetA1sygCvLWgNtAnnB2rqi8FfAw En7LYO0SU5HCEN79yDxx6HKHXjXAZBnJUvrfeHjuTupSTlv7JMa/borWgYsTuuTUQKgE uxWdb9Q9V4QcID7Mnw08gW475zK1jAB+umog7nSXqDQMLJfvetvHUn/xzUbVcu9pASVD a6aQ== 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=TZ5TppctqoxW4EspE/FSm5Md3eq5I44hNRg0H+gxelw=; b=v3OoWMh3eJRcwA07c7IbtFv6W+/sbwWwtARyBNTm/MTucee9CEXO/1IufJkaD3MEcv K7acMSndd8raNmdPOV4Z8msAda5ErItbuCeeX1Rqs0US4oJAzJG04aJTR7Y1Yis66Uec s9G9zLIivNLmwsx4PdsMxwtW737WFai4ggN1S4w+xB7x4aeQJiZIK0wPF3hBGAO6FDfW uVIpzAFAYoU7BQwdlV+7fHZPuzqKqmEjH+MXDde85xPaNbzMhtLld4cL59jRuySzHTkq 3Kx0j4+JruyRAZUVG20VUN6I8huevurLkdJJ+VKBrkV7yt4zFsUcTrWrD3G2q+U55bxx PS5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kgoATkMN; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y187-20020a638ac4000000b00461f10556b9si267183pgd.319.2022.10.24.11.45.46; Mon, 24 Oct 2022 11:46:00 -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=kgoATkMN; 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 S231266AbiJXSpS (ORCPT + 99 others); Mon, 24 Oct 2022 14:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232739AbiJXSoP (ORCPT ); Mon, 24 Oct 2022 14:44:15 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B900E1D6A53; Mon, 24 Oct 2022 10:26:25 -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 sin.source.kernel.org (Postfix) with ESMTPS id EBC47CE13C9; Mon, 24 Oct 2022 12:24:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C35E8C433D6; Mon, 24 Oct 2022 12:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614279; bh=Rma330vcrlPVgoryXY524v5pSS75fKfndTwK6rcbUcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgoATkMN1gE6O7w+exk0YoT0awam6IXnlwm0fefgTHkWDcmHKwf7Rh1/17Qgi+Gig Ihn68rIaROdB4r5/vs8xIwSi17aTkuQ/nAqclPoj/ZpL+yrmnFwGAsgrWgGQ3oN5xr vTC5PqyuA/b3S8FmS/2d3aalhs7gIvH+Oc4KAqV0= 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.10 201/390] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Mon, 24 Oct 2022 13:29:58 +0200 Message-Id: <20221024113031.324305472@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747595727288047224?= X-GMAIL-MSGID: =?utf-8?q?1747595727288047224?= 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 68cbb98af567..1a0016d07f88 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3697,6 +3697,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);