Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5892501ybi; Sun, 7 Jul 2019 15:40:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxb35fN2+PMbkSXRpcA/+q9nVQVn3r2oF3gmjVqg3tO58YxsNMBpP978e7dllcmEshhEPV X-Received: by 2002:a17:90a:3247:: with SMTP id k65mr20859322pjb.49.1562539251373; Sun, 07 Jul 2019 15:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562539251; cv=none; d=google.com; s=arc-20160816; b=Ugl0q5Blip+fUFfjlgrrDlJv6AkdC0lSm7Aco+ZTbvk47TIUa8VgzqysouypNeGU91 4kqzeRbJsQlr/1A652Z1iPPW7pX7W8FyEhBxVFpWOHidPSLqR8G8L+Aca+FMvajfacph GbDmsaA6I+CBkUZDYiH6OMF1dzmVXsB2Zpy/ENEfmPeBnReH9YFX+PdKK0YtetxzgjrG 4OS4DbP0yGybJAzR5awiLCObevtErOXrRf9acjfsqCvULCGO9ycOMGY1l2c5o7/EzGiP 3sBUJwtXhwg53qGHFcD/LZHKHj0fX9qmknCshaLaxX/ESym/uNXIAoGCq+N984A49He5 P5Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=l0Y+f7u40N89pZONent33wVS8aUfshisR9fo8pvYhQs=; b=RQAFk8LxtsEwRxkS17tmGYPbVYIA3srf3AddJjqrtkyqpORveE9b0l5SxgHs/t6rB9 jzX/LXqoOzfmXM+lheAMlKJFvlrjB3FVxZs2u8iZl7u165vVCDqZ+aKwsuQio0/M68Tb +Q8QT0pN4T8uqmsoUN/AwKil7o09+pkZUo7Cr6y5+/KOZ/L0Hqlf6VwhQNdTjWsO+TGt 0fJdrpyTLo4oxbzy/+rGOXyPVxqEUoyUygajQwwRO1KJhBsU8zs/4+wtCSxFulinSWyo v97ILWYUMvdSuFOBtFtGGsOFxeq5kZuRId8mW61u4sc7QG7DNQirsKSzbbUoNbf1zcuu vzGg== ARC-Authentication-Results: i=1; mx.google.com; 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 v1si15193402plp.264.2019.07.07.15.40.36; Sun, 07 Jul 2019 15:40:51 -0700 (PDT) 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; 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 S1728768AbfGGTrD (ORCPT + 99 others); Sun, 7 Jul 2019 15:47:03 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:56846 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727456AbfGGTiB (ORCPT ); Sun, 7 Jul 2019 15:38:01 -0400 Received: from 94.197.121.43.threembb.co.uk ([94.197.121.43] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkCz1-0006dK-AU; Sun, 07 Jul 2019 20:37:59 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hkCz0-0005XK-3h; Sun, 07 Jul 2019 20:37:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Yangtao Li" , "Stephen Boyd" , "Gregory CLEMENT" Date: Sun, 07 Jul 2019 17:54:17 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 013/129] clk: dove: fix refcount leak in dove_clk_init() In-Reply-To: X-SA-Exim-Connect-IP: 94.197.121.43 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.70-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Yangtao Li commit 8d726c5128298386b907963033be93407b0c4275 upstream. 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 [bwh: Backported to 3.16: There is no ddnp variable here] Signed-off-by: Ben Hutchings --- --- a/drivers/clk/mvebu/dove.c +++ b/drivers/clk/mvebu/dove.c @@ -187,7 +187,9 @@ static void __init dove_clk_init(struct mvebu_coreclk_setup(np, &dove_coreclks); - 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);