From patchwork Tue Jan 28 14:04:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232453 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=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 92C31C33CB2 for ; Tue, 28 Jan 2020 14:47:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5661620716 for ; Tue, 28 Jan 2020 14:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580222830; bh=1UFqR+rIqcMxH1JYOSDc6Lj1SyySYQkQAdQ/JB75h8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jX+LmfEXiTRG7db3wpHSRQdOvr0LwPiW/50Yj1EF187L+E8ART/9PeTtVSfaV0fD5 ATYakgdotWA3PedM9KSF3qp8uCiaDMX/6dwu4BweGVMR3PjySoJ9niFLApL6I2TerN WPLk18VdH6y3rztAH4kEtRdz6Ig8SaxxseV9SI/g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727150AbgA1OIH (ORCPT ); Tue, 28 Jan 2020 09:08:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:55990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728407AbgA1OIE (ORCPT ); Tue, 28 Jan 2020 09:08:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 CFB2424685; Tue, 28 Jan 2020 14:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220484; bh=1UFqR+rIqcMxH1JYOSDc6Lj1SyySYQkQAdQ/JB75h8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jJpN+SwCbfZuFTY+oYq014WfjGff6qpgq2jDleMna/CEOIZqIfO5Uqlxuwh/xDReS K6e9cZNCvpnFEZ/j8/u0D8y3VFABCtxUaftAT72mRQdeIkCR0pnU6ErRjgCm4maAqd rq/YzNPyDk7AwhVEBSA0IHRxWoe6JOo4epQ1yGrs= 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.4 025/183] clk: imx6q: fix refcount leak in imx6q_clocks_init() Date: Tue, 28 Jan 2020 15:04:04 +0100 Message-Id: <20200128135832.521623824@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135829.486060649@linuxfoundation.org> References: <20200128135829.486060649@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yangtao Li [ Upstream commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e ] 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: 2acd1b6f889c ("ARM: i.MX6: implement clocks using common clock framework") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/imx/clk-imx6q.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c index 46c05c9a93541..39ea50102d52f 100644 --- a/drivers/clk/imx/clk-imx6q.c +++ b/drivers/clk/imx/clk-imx6q.c @@ -155,6 +155,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); base = of_iomap(np, 0); WARN_ON(!base); + of_node_put(np); /* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */ if (clk_on_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) {