From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10519C33CB6 for ; Thu, 16 Jan 2020 17:57:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6A182073A for ; Thu, 16 Jan 2020 17:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579197460; bh=TccJOtcUyFcvwHWtKtKxjGMXYMYQYLbUUr4ZH9hOnyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=iFYc090U4o8bKDb9fi9DAEIcsm2FinqebIM4fIuFTVHTefFRGigwdx0hz8rUG8gUg jI3Z0luOUBuANDPIoIanPXSpHT+KfNZB1DGTwCXkM+q8s985yw4DLmHP2WT5aqgEHk mmTSm2iWRKEjglKGt+6lE3b4liMOqyWCNRO/nfKA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394591AbgAPR51 (ORCPT ); Thu, 16 Jan 2020 12:57:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:33490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405880AbgAPRnY (ORCPT ); Thu, 16 Jan 2020 12:43:24 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF1192473E; Thu, 16 Jan 2020 17:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579196604; bh=TccJOtcUyFcvwHWtKtKxjGMXYMYQYLbUUr4ZH9hOnyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tKk/7aKGh1Hx9+Zv6hBynixbm83v/K/qdF7y8axvXM3Y6avhj/OhuXstXnkJeznRg EM5Prr4lMPDVtLEpjtO27OaOndHgL4nuETBfIX8aBVSF0a2vzbxLsGrsjZJa0fmSWs TM74L/oFZHaHK/gCo8J0/fRfL6PDVOMSGIl/gtgs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yangtao Li , Stephen Boyd , Sasha Levin , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.4 025/174] clk: imx7d: fix refcount leak in imx7d_clocks_init() Date: Thu, 16 Jan 2020 12:40:22 -0500 Message-Id: <20200116174251.24326-25-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116174251.24326-1-sashal@kernel.org> References: <20200116174251.24326-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org From: Yangtao Li [ Upstream commit 5f8c183a996b76bb09748073c856e4246fd4ce95 ] The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount. Signed-off-by: Yangtao Li Fixes: 8f6d8094b215 ("ARM: imx: add imx7d clk tree support") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/imx/clk-imx7d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 448ef321948b..863163b239a3 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -386,6 +386,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) np = of_find_compatible_node(NULL, NULL, "fsl,imx7d-anatop"); base = of_iomap(np, 0); WARN_ON(!base); + of_node_put(np); clks[IMX7D_PLL_ARM_MAIN_SRC] = imx_clk_mux("pll_arm_main_src", base + 0x60, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel)); clks[IMX7D_PLL_DRAM_MAIN_SRC] = imx_clk_mux("pll_dram_main_src", base + 0x70, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel)); -- 2.20.1