From patchwork Wed Oct 19 08:29:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5220 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp265452wrs; Wed, 19 Oct 2022 04:22:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rz1l9tAP2BgiD9WR50H9bnYlTfg2SpeDy0sUU8EUevxFRShv4MOYskWn4KL8uUAdWWPyS X-Received: by 2002:a05:6402:298e:b0:451:129e:1b35 with SMTP id eq14-20020a056402298e00b00451129e1b35mr6867779edb.79.1666178545771; Wed, 19 Oct 2022 04:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178545; cv=none; d=google.com; s=arc-20160816; b=iDTP1EC3SJmawhpG17ZYKvkpIweilOntDAq/ArIJ1vt5ajm9DodrcJxP28FgkBzJDb CP6EdNNXqCV8v1YTWDi9PECGSg/VhHwfBDDAmW+b+MRXfEhz92r5rX4vj88wLbTQZjNP Ufc7klcIJcZyePVFNcfbiwGfaycHWz7D5B2EcnbYGDBEW1hwpaw2nBh3A7jhvGY8k0pS uVWbL6weUW5Jj3nyHS5y2rh3BWKa9I9FBaAzYAIyzWLFTuDhOmfrIr0nsknWuPxthUnS PlDBSPDr2X8eTM6iRE3SlIeBj4OFXTkWO7jGvf1hIgb27//GvLi+WcQZzDGBEetk4T0a RxzQ== 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=TCifrgbVIhF6IG3IN/+rWiGab9iYhQuo/bM3ZkfqbCs=; b=PsgTGmz8ivlk1d6fPH6+sbTMpMFoACBGppCaTzRfZjnrWTRwQOo4+PG+fCYYOubqPc 3KeAByBizloG0gxcmlGBTMViZ/lUpEjALygDel4n9drDMf4zM8t7CuGvY8imDnS4Nkrs 9vUHB6iAWLG2eTOd+oVuXmq1eCoARWzF6xhscoYgCAEj/9UeQXB1j740n/oFQyvPf9Le C/xJZV8j2EypKblSm5wPS7naA/kfo7pUeXpaa1owkk+Y3+jJRzXc8RLbH1pej66tC0Tt UmE9Mbngl99L9EGN7sxkHgk7c2vh27eMG+FO9fFHVD6lxXBaypsnYYZ43ivk9pm63njL AyJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U6qLd305; 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 sc11-20020a1709078a0b00b0078de51e1c3dsi13857622ejc.840.2022.10.19.04.21.51; Wed, 19 Oct 2022 04:22:25 -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=U6qLd305; 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 S233979AbiJSLJB (ORCPT + 99 others); Wed, 19 Oct 2022 07:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232405AbiJSLI2 (ORCPT ); Wed, 19 Oct 2022 07:08:28 -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 BA2BDF5CE8; Wed, 19 Oct 2022 03:37:07 -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 8B6D9B82448; Wed, 19 Oct 2022 08:59:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E10A1C433D6; Wed, 19 Oct 2022 08:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169972; bh=jY5QCfw7xTXd3ZKXFT3BA0Dy8YBjTPowLa9k7IVWMjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6qLd305VxxzEhr+1OUpWVItms4d04DaUTeDHkUdNlMVdgnMzp2m8qircqERZzZYy wgZyQiueTFuX9//NpY35XDc9T5N3pX/dOZL9WA+XWboQEGWuHQVMSHg+IpTi+Sv/Lt S7gMVJ05eJyfXQRe/aJnZDSur2/QkCMWnfCsx2+4= 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 6.0 477/862] clk: tegra20: Fix refcount leak in tegra20_clock_init Date: Wed, 19 Oct 2022 10:29:24 +0200 Message-Id: <20221019083311.026012365@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747114834946596856?= X-GMAIL-MSGID: =?utf-8?q?1747114834946596856?= 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 be3c33441cfc..8a4514f6d503 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -1131,6 +1131,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();