From patchwork Fri Jan 24 09:24:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233064 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 5A667C32771 for ; Fri, 24 Jan 2020 11:04:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23B072075D for ; Fri, 24 Jan 2020 11:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863892; bh=Sp+v2Kr5TLQg+34wEGwkzVvFmcfqHqTxKUXJE3fjHGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JbCTn2vP9lhXpYA6nJ9cXoH2z8mnTQ+LjzSCt1OYSEPWpTMlFE8xePTzHf+hNdjXe lXYA5Mo34+nRZL4XFYHSTZGJ8O/d54iB2AofIIwwohhGndXJJCZvVbFPppaIrmmRY9 ZToDLxd2GOq3MKEt2C+DDztSLbEI3+Ykj5CdGTVA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732677AbgAXLEu (ORCPT ); Fri, 24 Jan 2020 06:04:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:39040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388223AbgAXLEu (ORCPT ); Fri, 24 Jan 2020 06:04:50 -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 E3CB52075D; Fri, 24 Jan 2020 11:04:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579863889; bh=Sp+v2Kr5TLQg+34wEGwkzVvFmcfqHqTxKUXJE3fjHGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VCcfuJId3+J2XFQoK6bYytslrlI+DWcDvMNWL126O0V30Z3fN5rhl6rromQri8y4y ELCF2HxIsEQ3VXj707ETAUNcEk1o+RcNz1ighMDeMi+EPPMQLl6VlUNtQdV36SbL9K RDGl6LGQiGVDtQfSpgBGwK435lUOm5CnFByrfyRg= 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.19 102/639] clk: qoriq: fix refcount leak in clockgen_init() Date: Fri, 24 Jan 2020 10:24:32 +0100 Message-Id: <20200124093100.139691062@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 70af6c5b5270e8101f318c4b69cc98a726edfab9 ] 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: 0dfc86b3173f ("clk: qoriq: Move chip-specific knowledge into driver") Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-qoriq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 8abc5c8cb8b8c..a0713b2a12f37 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -1389,6 +1389,7 @@ static void __init clockgen_init(struct device_node *np) pr_err("%s: Couldn't map %pOF regs\n", __func__, guts); } + of_node_put(guts); } }