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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 7A9F1C2D0DB for ; Fri, 24 Jan 2020 11:06:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49ACD214AF for ; Fri, 24 Jan 2020 11:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863960; bh=sW0JEfjDsZMoCmQzP96dh5i2+m/FbYoUPESR4+ht1uU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=02TYPBUYsmzXbs8CRhx+FSmN9OsjJ+fxOq/Sozt0taUAgj/R+pqweXr4X5Oy5GFbI SOqNawXCSVwg+TshjYb0lxbsKKcZvSQ3hBQoNSxwS7fzuT9pxfQNlreRGualprGjR4 sSweEJ3XxgiRNCG1W9joPKgaBksWl/sCIqXeQ4Ik= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388678AbgAXLF7 (ORCPT ); Fri, 24 Jan 2020 06:05:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:40538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732644AbgAXLF5 (ORCPT ); Fri, 24 Jan 2020 06:05:57 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C4B5A20663; Fri, 24 Jan 2020 11:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863956; bh=sW0JEfjDsZMoCmQzP96dh5i2+m/FbYoUPESR4+ht1uU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MgdDTpYi9TWLNzf1hMo8chGRQpGH1G6wGiHxYfVe1B+WAfl11QjWcgnN+wZ7vPHkH YKTUeeSKBhcpdmPTkHuYqkjxYi8i4Eel/9HcOHmBELCKo8oTaYAUfAuKeeV6Xg6zlM PFxwuZjzaXwXv9sPbcItkMJqPK+gjVA7Hprca1gw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yangtao Li , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 108/639] clk: imx7d: fix refcount leak in imx7d_clocks_init() Date: Fri, 24 Jan 2020 10:24:38 +0100 Message-Id: <20200124093100.882561051@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 881b772c4ac97..83412bc36ebfb 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -413,6 +413,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