Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6737909rwi; Mon, 24 Oct 2022 05:36:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fhIIByL0wAJZHjzRhdpAaR/tUiOB4TwDZhCJaViaX88+/nd72AUqqkpoH9JZMuZ5tuyu7 X-Received: by 2002:aa7:8895:0:b0:565:e8b7:8494 with SMTP id z21-20020aa78895000000b00565e8b78494mr33847300pfe.82.1666615013962; Mon, 24 Oct 2022 05:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615013; cv=none; d=google.com; s=arc-20160816; b=llj/pQ2SpOhDT256YODxRN8XMkxVfFQ06cNXqPFbyd91ak4QcYQs4yX1CBTWP3Ml6Z yBKdRU0s8KRFhhxz/lBpVAL6WzaMfZXa/vLMcQnRDVu23hPriYKwTWAnI/bMaomPMMTL FB+pGr5pnN5rUfWRgOOz6+wzdAhq/L5SgiOJdQhK1z8biBQSFxJct0QJv5p0EAbWV8Qn hn2WwV2tn016LE9KqgLJSlV3nsbcts3UfPsu62WIyMBfURlfFtHdnL+CMahveXVn96oz DGAvyAucDeZzGDrohBIYP+8xxwWaS19SHduffD1vvGOH5AGOorf7SmSNQ8xDahvNgiUJ hWCw== 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=F2D8qWkAFjmj9aOPFnI1ohFLrF4OGWiuqNUGEqJJjjQ=; b=sv6hmoiQbRk020SrHOQHVNlts2OXBnie+cxneJGFfT5aMOFoTZbfBuPRfhJ6D95Yu4 qUUZdg5EYOUoYA+c4Hp398DbnLP+Lwcs3C5/WDYh52x80xE1n6q+QGGL0pA621Ljjno+ /l9FCNxbOAJBySKp3svQuSGNjSDRJUg3/kjJh2x/RSL+99NBZEbaqhSvENefDDbERlBa WB+MzBgFDvJHRLKizKeVRODvEeyViwgIuQKlGDbieG1iu89tEFz7VQMCiuUc09kcbBhS +1QNHviLSnWeZBjYMyLTBoBJvz0EJl0rniAirCD3m5eEFkxU42DQYC6Fc3JrRF5KeIaC 3ZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yzobpuij; 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 bj4-20020a170902850400b001865c57b5adsi14898123plb.87.2022.10.24.05.36.42; Mon, 24 Oct 2022 05:36:53 -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=Yzobpuij; 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 S231673AbiJXLsI (ORCPT + 99 others); Mon, 24 Oct 2022 07:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbiJXLrP (ORCPT ); Mon, 24 Oct 2022 07:47:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C4A26571; Mon, 24 Oct 2022 04:42:59 -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 7606B61257; Mon, 24 Oct 2022 11:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83779C433D7; Mon, 24 Oct 2022 11:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611741; bh=g3xurf+26Zeho2T4obK1FAu9yl7PM0ykkt9q2gqZ0KA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YzobpuijF4ol/wBtCL9EXZyt6Ab4gVhLwBUVHHg1HkiPQcptIhxRsLjRhfEtY3L3R ZQmWQeIB5LsCu5DQ+VvLot2eA+LwfHCGkxLQW/dA0Zjb+Jk2BfFmrzIqMmDCnrXEF5 brJKxsW0sqIBMDU7Ho0xl2xBGdH4Ar6DaC3EGU0w= 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 094/159] clk: tegra20: Fix refcount leak in tegra20_clock_init Date: Mon, 24 Oct 2022 13:30:48 +0200 Message-Id: <20221024112952.857340828@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 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 837e5cbd60e9..4c9038e73888 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -1101,6 +1101,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