Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3938209rwi; Sat, 22 Oct 2022 02:32:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5djsbaPADpP/K10oYNuUFVak/+4CAamygmslAIpDgPS+AkvFEhBRCeKrkaSkxQp4tnVvLo X-Received: by 2002:a05:6402:22f1:b0:461:15f0:a543 with SMTP id dn17-20020a05640222f100b0046115f0a543mr10003730edb.208.1666431147598; Sat, 22 Oct 2022 02:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666431147; cv=none; d=google.com; s=arc-20160816; b=L7gOk2w7wjvsKQdwBGr4qqgCUrjaz6h2G9LC458Ls4GPDTexrnbzQS7nFtW0bqjATa P+hUVMw1DgNazpkcSDaG1ElqOMlunigpuCdu9RCrZOprnays+0F4Yl/7DMJEz/6tdJw6 gZtXoJ4BEFhiz3lPm8Arl2bfnaLmf6MyqWrf4PhDyQ5jeU+hCNf2a688/L579tR+MbM8 s9V2QRPdwfz6vEkN2DuuUV4evUKlYKucC1GZ+fMfogA2yKsShq7sg7DFbF/E8drbu2EN qIcjJ9fUe7PcIt9oKquG+9BNf5GJm6AUZnql+cDrAwo+6k5U4g9TYvmcJUa7uredYPcv NpAg== 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=cen2YGSRvdqUxH1C6nfMuzsrMFf7Ex2Ai+kBXELnE9bb0bJRbh1qjcizvQxroyzDWZ IaaXWYJ8L6+gAgz0crS8npW8ay9vFzbgkxmRsqA/DAsb4OB9hHG1HuB+uaVBqLDBwou/ UVM7bgKOhLLtWCzrZdXoCkRPmORkd75DfZMy5568XlICBjTTfvK6VD3ipwMlmT47cUAN wp3qWURWosTLjrRsQ8ZRVo/Urvg1t7gfmCN4WyoeVCh0Rnjtvk5RgHwx1aB8rFNhNNQz AdbxBfNguBuhQu5ZaPatV+XAcsiJTQ+sjswcPaJs9pytAkfTuRBoEzojXgooMXgnA6Co zobw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KinvGyGv; 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 cn25-20020a0564020cb900b0045d53f8ea52si17698881edb.1.2022.10.22.02.32.02; Sat, 22 Oct 2022 02:32:27 -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=KinvGyGv; 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 S231245AbiJVJPi (ORCPT + 99 others); Sat, 22 Oct 2022 05:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbiJVJO5 (ORCPT ); Sat, 22 Oct 2022 05:14:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A242C64A; Sat, 22 Oct 2022 01:29:40 -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 9011F60B79; Sat, 22 Oct 2022 07:51:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94311C433C1; Sat, 22 Oct 2022 07:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425103; bh=jY5QCfw7xTXd3ZKXFT3BA0Dy8YBjTPowLa9k7IVWMjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KinvGyGv8pYOg0vqWQ0fcQg1+z7y5LRzRqHbSqyhFfOKB70j23hrStZkPTTsRzf7s xWd3ItHETRRWs0jhoopDyJHWVxSqj2jtP8ykp2KuIwA8slBXz8yy1urqwbKrnm89Vu gyWIGdCSeNOqv98ccix1Toxht9ewdFq0AO1a//qg= 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 389/717] clk: tegra20: Fix refcount leak in tegra20_clock_init Date: Sat, 22 Oct 2022 09:24:28 +0200 Message-Id: <20221022072514.805820361@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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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(); -- 2.35.1