From patchwork Sat Oct 22 07:24:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7470 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1099029wrr; Sat, 22 Oct 2022 01:12:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IQBeAwJUueIONvYW01VMrNJyHMsZbFgojgZn/VR0XONAJDAmA+MmQw7O62VuIW6SynRT0 X-Received: by 2002:a17:902:edcd:b0:17a:6fa:228d with SMTP id q13-20020a170902edcd00b0017a06fa228dmr23201733plk.29.1666426346852; Sat, 22 Oct 2022 01:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426346; cv=none; d=google.com; s=arc-20160816; b=ZjTSiQdhJSTwf3oaP9I0wMOvETc/lIpXAmO/rBA+Rz5eiAazZeji0SqobpmRK0aBej gTB3KPIJsM3qbh8cPhM5HYvCGv3gkMr7lZSno9x2JdFekzmY+8rFl33SZ6V3BKtryMfF LOh2mfE6z9RpZ3VzQYwd0Hx90dAUyQNwUHutMo8+saLKb8NKXgIWq5/A/Zkw9MXBX75m l/LALuKfiYGEaI2kSfK/kSks01hmuHWr1xXuWiOChonmg9T167bI6lQxWbDfsckRQ+pt j3zZ73gfpdniuurNzlIexObEo7IZ076c2SF31PG8gnJ7lFT+ZwrmiyQZ/bzFTGvlf/vY BVTQ== 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=jsEfyFQKirU94htMd9BNVsMLlD45vinhDMQosHu/5eY=; b=uvED0xHgsxxIh2vBPL23s0U9TeLg1BHCBDVtJubMVN1pfFGSCpbflUTBALZvcGhwfc GBWWQNYlgCR2pEBlmZkQW6UHXAJ0fQEkg/ref1zPC/8QU+tfE9xBazqCFMCNIrRC8zCy DlgEYdwjcv0ebl1IVcOJp4GuKNwiQs8aAVlXySRFN7UsxrsmNAvmWu2hKNRuROglzjDR BOn2VW0QbZyEuCrJfv4MNCc31rhbgtV8tYcZS1/9X+uyQioihAFkpVXc6QudBKgkieHg PcdIHKni4QswZSrxMaF/rgSE3roFSuNkWDj7asERHMdjBfVLgSMcljxHd+n8puZFmvDx t5qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FvIysgFX; 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 o15-20020a17090a3d4f00b0020addb2c6e7si2248801pjf.85.2022.10.22.01.12.14; Sat, 22 Oct 2022 01:12:26 -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=FvIysgFX; 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 S233213AbiJVILm (ORCPT + 99 others); Sat, 22 Oct 2022 04:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbiJVIJo (ORCPT ); Sat, 22 Oct 2022 04:09:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D4FF66F21; Sat, 22 Oct 2022 00:54:10 -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 B4EEE60B09; Sat, 22 Oct 2022 07:51:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C531AC433D6; Sat, 22 Oct 2022 07:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425097; bh=I9d031I2SDmf36pt9nJFhqyJf4Vp12w30552pTi83wQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FvIysgFXbeQLcKBYoHgoFWnQfhzL1d3MDSeeUDYoWjE1yFQFmpINDnUmDI2O5jZvR zhL5oz3iuS5DdFz8jynzVTMdKGbEiINfLAQ9vHDupmRSWO0g1Nqva2DkY2ZrPFpFE7 cP+W6fDM+luFZqF0VjdsFMU6jZJeAFP2oeqDK2SI= 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.19 387/717] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Sat, 22 Oct 2022 09:24:26 +0200 Message-Id: <20221022072514.701973517@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374672729042128?= X-GMAIL-MSGID: =?utf-8?q?1747374672729042128?= 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 b9099012dc7b..499f999e91e1 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3748,6 +3748,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);