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=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 36E83C33CAF for ; Thu, 16 Jan 2020 17:35:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02BE8246D8 for ; Thu, 16 Jan 2020 17:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579196118; bh=pkx0yXIJGjk4uDyY2N8qEi31EmVtnwYkT0qbkPSW844=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=q8pvQ6LNrkNoIy9tjEfKQtVLSahtiYkfgCHMma2DSDubz9I63ZPmbx297vpDNEUsr WyxilCcwsk8jkYPcFwwxyXeshXYCm13N1zHYWpvqZHZIFbTYHpmdHfsTZXCW/uV73I 7acJeRw1lK5ecGEoQQx8s6txhAcaeLpc3vYLHWrg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404943AbgAPRfR (ORCPT ); Thu, 16 Jan 2020 12:35:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:49510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404939AbgAPRfQ (ORCPT ); Thu, 16 Jan 2020 12:35:16 -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 68473246C0; Thu, 16 Jan 2020 17:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579196116; bh=pkx0yXIJGjk4uDyY2N8qEi31EmVtnwYkT0qbkPSW844=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NhoYwrsh+zT02fhLFu11lJFeVxnykA7o2qpxjPvsxYocc7BK1FVu7erMOOcqF38gn xkHrLmAHADFqdUbqa/yx3/et0gOWHT6a4mXZuUplnZI19L5GsSWs6rJfx2tp087mTi cx6c1iOrG3eAY3WRaDc6sw3M+PmPLtDY/+WDQ1RI= 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 Subject: [PATCH AUTOSEL 4.9 024/251] clk: highbank: fix refcount leak in hb_clk_init() Date: Thu, 16 Jan 2020 12:30:58 -0500 Message-Id: <20200116173445.21385-24-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116173445.21385-1-sashal@kernel.org> References: <20200116173445.21385-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 5eb8ba90958de1285120dae5d3a5d2b1a360b3b4 ] 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: 26cae166cff9 ("ARM: highbank: remove custom .init_time hook") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-highbank.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c index 727ed8e1bb72..8e4581004695 100644 --- a/drivers/clk/clk-highbank.c +++ b/drivers/clk/clk-highbank.c @@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk /* Map system registers */ srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); hb_clk->reg = of_iomap(srnp, 0); + of_node_put(srnp); BUG_ON(!hb_clk->reg); hb_clk->reg += reg; -- 2.20.1