From patchwork Fri Jan 24 09:24:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233059 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 AE81FC32771 for ; Fri, 24 Jan 2020 11:05:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8562B2075D for ; Fri, 24 Jan 2020 11:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863931; bh=HSev9NpQU1x6v9EGBt+tR8wzvFG0L/tTisqwtR0alCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fByk3qAKEPSKUyFW2rkhFEpguHwChWLcZw3B4tA7UinAzFsHes7SX6gfL241GJL/p VLCrhHHLzUykjvVZA0VUTvN9gk+oFrVaywjTf9L+0Z26L8TcmKC+vSJiM1iUCq2mxb /dRwfQLjKfrUj3Ev5o2oljmQ4uwSHaIalbu/jFzk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387655AbgAXLFa (ORCPT ); Fri, 24 Jan 2020 06:05:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:39938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732436AbgAXLF2 (ORCPT ); Fri, 24 Jan 2020 06:05:28 -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 B16E82071A; Fri, 24 Jan 2020 11:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863928; bh=HSev9NpQU1x6v9EGBt+tR8wzvFG0L/tTisqwtR0alCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D4aHRK3NuCEkNxs70p1bZY+hjp8WZENwRV7xsFvDTEn4h4RFYAjnfqiYD89KTsAM0 DFSsIc1ZVE6gn69fujnWEbR4W+7OFuJlxrV+t/uL+atjVboD51pVdp6wCyHDNd7INp PJlXSAXR8xVUmDuL35uFbI3th281EoCb59I2zV1Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yangtao Li , Gregory CLEMENT , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 112/639] clk: armada-xp: fix refcount leak in axp_clk_init() Date: Fri, 24 Jan 2020 10:24:42 +0100 Message-Id: <20200124093101.371688523@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 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yangtao Li [ Upstream commit db20a90a4b6745dad62753f8bd2f66afdd5abc84 ] 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 Reviewed-by: Gregory CLEMENT Fixes: 0a11a6ae9437 ("clk: mvebu: armada-xp: maintain clock init order") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/mvebu/armada-xp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mvebu/armada-xp.c b/drivers/clk/mvebu/armada-xp.c index 0ec44ae9a2a26..df529982adc97 100644 --- a/drivers/clk/mvebu/armada-xp.c +++ b/drivers/clk/mvebu/armada-xp.c @@ -228,7 +228,9 @@ static void __init axp_clk_init(struct device_node *np) mvebu_coreclk_setup(np, &axp_coreclks); - if (cgnp) + if (cgnp) { mvebu_clk_gating_setup(cgnp, axp_gating_desc); + of_node_put(cgnp); + } } CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init);