Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7026902rwi; Mon, 24 Oct 2022 08:58:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nWLl69q/ijUWvIZTso111lEXVorF0Fxe29uFRWOC7Jii6INlOmsgkeBVGrXLZ70FKagLk X-Received: by 2002:a05:6402:344:b0:461:7d4:9c9 with SMTP id r4-20020a056402034400b0046107d409c9mr21155124edw.141.1666627098927; Mon, 24 Oct 2022 08:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627098; cv=none; d=google.com; s=arc-20160816; b=RkmEcNzhzxNLDNoiclRqdnSfyTLCnwn48/IxmLKU+D3F2BzoT0BxteS1Vxarp5B5Fh jeKye2EFtZ8aIg+DNGfVcwXWlGYGu9cGaHl4tRK5Gi7gvzLFMxnPwVWXW7bzr0sCnUH6 41siF03i16dJQgwA/t5BK6WGV4lSxsVTHnqlqB+IPUIkB86wp4Ds9c0m2/H2Jg4RygsL rX+4XgnbHpxNT8tGz+Itfc5mI1L417W9/M03h5SogZbUcyywMPoA29LJHwLeeuoYdotk 8oUW7u0m43nuEipnEY8H6G7vQR0aHb5XEQS36MgUO9ey4I1IY2fQ98k1sWYOnAngbSrf ghpQ== 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=cKZ4oQExA+8BD251kHlXtMX5j4Lcm9mNaE1/Uu7ENb8=; b=PQH5+u/Koqhg65/yl5//uF+7xMgSMo6oG/Qdm4+uj2atUU5K1Q6m0rzAsNHrvS3oZF M3xf2Pi1I4TippNc7OCsrWCEoAdham+jGNY+XTGMsUNrmhiEKlmvG89+YQHEtk/uTrsf 1MQSNcncRYDxhsogRYnXVKZxZbx3+eS+a/kqWz7l0Br5CnjCyD/YpCQsMxIoYJxxS8J5 quAh2U3K0lyQrixO6z0K1/0r3CQSO7XUrDaxQ0ryTcMMZXYvA6HnrexrCbsVnynGKfpi qFmUJeGcP+gLKd15uoq59Ixo2cC9N8fCN6JHqDvXNuH9Is0MfNbl+IWZxdBzVc4+VKeF uEEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s+df8uSL; 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 w3-20020a1709067c8300b007a9fc5516f6si101145ejo.307.2022.10.24.08.57.54; Mon, 24 Oct 2022 08:58:18 -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=s+df8uSL; 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 S232212AbiJXPGZ (ORCPT + 99 others); Mon, 24 Oct 2022 11:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232242AbiJXPGF (ORCPT ); Mon, 24 Oct 2022 11:06:05 -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 F046F814DD; Mon, 24 Oct 2022 06:42:54 -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 06882CE131B; Mon, 24 Oct 2022 11:50:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19937C433D7; Mon, 24 Oct 2022 11:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612226; bh=FkJzQqyuzVINUw/JtDrOgZ4bFtKbtqYn4qROJOxUE/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s+df8uSLAaBPn7jmFlUEGskw+BocKpjUlv5Yq+iycRwdgXtDCIe2fBa8qlFPZlifl UQWGPvXe5m62G9ODAeMKQ+QDuT+UV2r/TFsRFlTXDXvJy/pg/yNyajM4h+9WMLyNKC iLNl9g35icQB3lKboG9JfWZ1lsc5LqJUAiweFjfo= 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 4.14 118/210] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Mon, 24 Oct 2022 13:30:35 +0200 Message-Id: <20221024113000.815596438@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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 cb2be154db3b..8aa400d04c6b 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3130,6 +3130,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