Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp460115ybl; Tue, 28 Jan 2020 06:19:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxk8xYTr4UxKXKDGpSPnH/sCleOdMOT90Qr/+twb7JrdEQu6Tea9qZsK8HPWQFHkWxRDflL X-Received: by 2002:a9d:831:: with SMTP id 46mr4908734oty.295.1580221151849; Tue, 28 Jan 2020 06:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221151; cv=none; d=google.com; s=arc-20160816; b=OPI3T5lCTm/+PrykH1UovgPq5mgr6w9jDwArdxbP7nY3Ym4UXoijYTOOb8fEsI0Yxh 84WYWvt963NYGA1qiXcGVuQyXBrN70pN12l75WhdEKTiGHAtet5O2BeMegK2M2UyRWZv fF7Wdh3KTiqNhBvmkdYIu1mIyHtVYDrBvgFUmMH+DqFu6FWPZ1zyyEGpi2RR08T7yPTR 4c2QxfcZPTZSv2vplymNLj+dnXwXmpIuOuU6/IQbFUuIrnvJGoTGjZxCnQAIdZ0dA/jd THgn5d61t4C9T+h8ARlYgM0Dpf7aGDkTSw2/yGkS0yTXSGE3FQpxpFNGXTSLzf1iWboe x5HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wBdvUyK1szEXpoeh42WKP9fW6q7xvlSobOy4jCtrrqo=; b=wI69PsBTlY7K+6tLoeTycLgR5vGGkaQ1mIBbDCIRkqKXkesQ0hruPjffQS1gFRPfrZ Aw/hCO+FXOKXE3K4vsVfH/0DjZSf+vURtDfMBrGDw6aetFRD8E1tRDsNIgiy3zK5QdyX PYG0xEfh9vCr1TW5mdX5zurmwhWwVGIooW5YNeaZg7p/zYZMQW4Z/bp3ASrrqDvSHcgr ZFuy7X5NdLJ8OcSyWiNQk24YGE+Lfn1yeTRiWEZFTwP/udxocwqfOF/px69u9GnJiNw5 An98ZJ2O3CetvNkasirhD7OWCBEqHC/4OeC6KsWDaNCSObNIseItgjVSvNoMMjQKu7Ik qIZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x0FEviZ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si9471684otf.178.2020.01.28.06.18.58; Tue, 28 Jan 2020 06:19:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x0FEviZ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730368AbgA1OR4 (ORCPT + 99 others); Tue, 28 Jan 2020 09:17:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:41566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730562AbgA1ORp (ORCPT ); Tue, 28 Jan 2020 09:17:45 -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 373562468D; Tue, 28 Jan 2020 14:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221064; bh=DMawGORGw/GHzM9qUcSUjMhFK4aAx1nQqfwLv03Q3sA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x0FEviZ7BsAX+dQ7U2YygIIjt5WJeY3656rbNsPXw9ogc1npprGDXwUPuToRfZP/E MP+9V7KNF/w4seLtPIaOO8+X82/Wwk8SHdDVMUlQoy89Ryr/1scLCSikfAkvIic0Xj wOAKUgrxWpZYi7L5nyxozSKHwmIdrlu0WMU1uyAw= 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.9 037/271] clk: dove: fix refcount leak in dove_clk_init() Date: Tue, 28 Jan 2020 15:03:06 +0100 Message-Id: <20200128135855.436158530@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@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 8d726c5128298386b907963033be93407b0c4275 ] 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: 8f7fc5450b64 ("clk: mvebu: dove: maintain clock init order") Fixes: 63b8d92c793f ("clk: add Dove PLL divider support for GPU, VMeta and AXI clocks") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/mvebu/dove.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mvebu/dove.c b/drivers/clk/mvebu/dove.c index 59fad9546c847..5f258c9bb68bf 100644 --- a/drivers/clk/mvebu/dove.c +++ b/drivers/clk/mvebu/dove.c @@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np) mvebu_coreclk_setup(np, &dove_coreclks); - if (ddnp) + if (ddnp) { dove_divider_clk_init(ddnp); + of_node_put(ddnp); + } - if (cgnp) + if (cgnp) { mvebu_clk_gating_setup(cgnp, dove_gating_desc); + of_node_put(cgnp); + } } CLK_OF_DECLARE(dove_clk, "marvell,dove-core-clock", dove_clk_init); -- 2.20.1