From patchwork Fri Jul 13 16:40:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10523861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4109D6028E for ; Fri, 13 Jul 2018 16:46:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F23F287FB for ; Fri, 13 Jul 2018 16:46:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2180A288A0; Fri, 13 Jul 2018 16:46:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CAE14287FB for ; Fri, 13 Jul 2018 16:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=As2TFT8QuQs0SP+aD5sJ0q6PXLUv0nwcCC+iQflj0Ps=; b=sCG Ufv/HCglNdwcqeRdWaAmVCLySNmbepW0ZppvaU7cibk1NTGcpKSCXUGhH6nfAoSPOs2ta5BMqOyIc IQKryz9sens/yvrL55uPZwlDPzkTBf1YgK3tWsOAYoKCZg9cd500jjcs6vgRqCrVSs2i1sVtfo8Hk uiTyotPOPof3xkaVV6tRLalAMJT/PfcGFSJGR/8jaGqKEXySAhLppO2/VHl9PFtX3xS7q0Jq6yL07 xftVAJJiHXsVik3pXwT77/acE1fG8mWjZM5a6Iju21GHjgcSiEPhqZQGHGKdtuQJ8b70zmC5Jnzpk n2PA4EHUA8m0XVoE1Or0meA0r7oE7Dw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fe1DD-0007Fj-Ee; Fri, 13 Jul 2018 16:46:31 +0000 Received: from www.osadl.org ([62.245.132.105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fe1A8-0005eL-2s for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2018 16:43:22 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id w6DGelpF001608; Fri, 13 Jul 2018 18:40:48 +0200 From: Nicholas Mc Guire To: Shawn Guo Subject: [PATCH] clk: imx6sll: fix missing of_node_put() Date: Fri, 13 Jul 2018 18:40:04 +0200 Message-Id: <1531500004-23175-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180713_094320_432828_833BD7BB X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bai Ping , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Nicholas Mc Guire , Fabio Estevam , Sascha Hauer , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP of_find_compatible_node() is returning a device node with refcount incremented and must be explicitly decremented after the last use which is right after the us in of_iomap() here. Signed-off-by: Nicholas Mc Guire Fixes: commit 4a5f720b6542 ("clk: imx: add clock driver for imx6sll") --- Problem located with experimental coccinelle script looks like cut&past error from imx6ul (or vice versa) Patch was compile tested with: imx_v6_v7_defconfig (implies CONFIG_SOC_IMX6SLL=y) Patch is against 4.18-rc4 (localversion-next is next-20180713) drivers/clk/imx/clk-imx6sll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx6sll.c b/drivers/clk/imx/clk-imx6sll.c index 6270645..52379ee 100644 --- a/drivers/clk/imx/clk-imx6sll.c +++ b/drivers/clk/imx/clk-imx6sll.c @@ -92,6 +92,7 @@ static void __init imx6sll_clocks_init(struct device_node *ccm_node) np = of_find_compatible_node(NULL, NULL, "fsl,imx6sll-anatop"); base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!base); /* Do not bypass PLLs initially */