Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6738297rwi; Mon, 24 Oct 2022 05:37:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+bfw9gVvoP1WcfcDP7HV/rPz6OsliFkCLHU0c6V6amudWuWGc+On1yTLsp54w8OZbEEIM X-Received: by 2002:a65:6d8a:0:b0:43c:9fcc:cb24 with SMTP id bc10-20020a656d8a000000b0043c9fcccb24mr28334723pgb.477.1666615030800; Mon, 24 Oct 2022 05:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615030; cv=none; d=google.com; s=arc-20160816; b=RmVNFioHx7kEtFx1K0pL7Yrrejw7Ur2+nOuH43DEF0UNLLJDh8Y6aTGWWXQIB8T1O9 +8zY9Hj/y0yXWaONHYf9hHTFoz2hoRqYMhv2Wiy66KfqQaI4nh8MsX2PPyVtlZTJONo5 CzhBx7JWIbbpqj7wMTTwoPuaLHa/XHlhmYg9iCqyoGiTcuM75mpvNJj72xtUjQe/eqpk V7zhauGGlblKHu/oJIUUeAjDBlAX+xgphOM3Fs7lDQ/5APexvAYFMwvXQvn+ofyt9KUj QvPzGsE17rb0CvNUVEFqPF2OyUF0gpdHAsCGLEJGqg/tubSO4iEnykhAXkjuDQEKIOZC /BXg== 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=cs5tJDXEP89aZSi7DY0mX3HG7RYGnAhL+X7MivMUEHE=; b=f4sl1FcZMO6IkJY7dmhhLF26Qo/VpFimvIoDgpd/5DXM/tPmvE6UI7D8QA7BX6IElf 0taFe8QswpoePoUsphvnyCgBBTXaR9+cdoKOTgTkz8nWCjaaszS6LeN8EMncwHJ5GxvX NKMK720pse0E6kSVXP7XaFdmLr0BrpZ2dPFnufXSRy55skzzwDbgAWMFM2O2SIaYfHDC FoqRZEVF9P1kLHbSFXouueXfwPQIhk389SYL1mfGyyz6ajtPRJ1uTtokQpGRH5VWJsJG +fHg8rdSXOkHvyYOL3nXgDBud0+fO4DbFEqBPKts+VLqSRwJemn8AHsGQ/GaYs+j+xQZ hK9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WtacQ9ov; 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 m5-20020a632605000000b00460d04d9decsi34966585pgm.496.2022.10.24.05.36.58; Mon, 24 Oct 2022 05:37:10 -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=WtacQ9ov; 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 S231697AbiJXLr3 (ORCPT + 99 others); Mon, 24 Oct 2022 07:47:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbiJXLp5 (ORCPT ); Mon, 24 Oct 2022 07:45:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6D0475FEE; Mon, 24 Oct 2022 04:42:37 -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 E5A1CB8117E; Mon, 24 Oct 2022 11:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43C18C433D7; Mon, 24 Oct 2022 11:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611736; bh=65y9OxWLOZDKRavNVEMFCUaCmBhr7AWP+ncg6Ea8cpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WtacQ9ovxKgoUqzVLS4WrpiuTDwZg9JzknYqHlYudoZoSKaHPh4g/qUJCjpJ3EjKo l1gjnvI1KGSv7RGV1RfGK2FhDvloK0kaGmVRhWZdrQfJzO+8EcOU2hvFPnWguKYKv3 OvBqH7B8DkZJW3jzKqyz0y8PMbrSSLkI71Kwn66g= 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.9 092/159] clk: tegra: Fix refcount leak in tegra210_clock_init Date: Mon, 24 Oct 2022 13:30:46 +0200 Message-Id: <20221024112952.789804054@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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 2896d2e783ce..21b426d508aa 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -2706,6 +2706,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