From patchwork Tue Oct 27 13:52:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 307106 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 84047C64E69 for ; Tue, 27 Oct 2020 17:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C0C921D24 for ; Tue, 27 Oct 2020 17:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603819888; bh=mlBNBUT6nslyv3He4klUS121kRNBOHMWavGMQwynaTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eETN23j81H3sLAvLtoL93KMKsJf1a4gA9F7iP3oHPBQXi5mY7FSJbtFyWmvPZWuWM 7sniBVC4PjWgLqq5KbZkcfkZpOGaDNkLlWWcf8P7fD9rE64Dyp0Ha6W0LLAtJZNgIG 3ZxzSunx5PwUKOrVkaW0viPilrqf6Lx6rzgn6apU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761010AbgJ0Ohe (ORCPT ); Tue, 27 Oct 2020 10:37:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:36572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1743301AbgJ0Ohb (ORCPT ); Tue, 27 Oct 2020 10:37:31 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 89D8F20759; Tue, 27 Oct 2020 14:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809451; bh=mlBNBUT6nslyv3He4klUS121kRNBOHMWavGMQwynaTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wORgtNHoksGtn4k1BBhrhd9dcWmOIuCg7iLDyxjxsmqx3pDt0YXbSoxlhAQbRgrDB lZbVefeCQgUiJ69FduE7jT762Amo+e7LKblM9qGEQCNA3lemcAWxdYhiug9yX/zRGi Xp/VfXjIMORsGaz3SVju7OpT8MHNDkFxlFpQ2UBY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Mc Guire , Michael Ellerman , Sasha Levin Subject: [PATCH 5.4 200/408] powerpc/icp-hv: Fix missing of_node_put() in success path Date: Tue, 27 Oct 2020 14:52:18 +0100 Message-Id: <20201027135504.378046496@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nicholas Mc Guire [ Upstream commit d3e669f31ec35856f5e85df9224ede5bdbf1bc7b ] Both of_find_compatible_node() and of_find_node_by_type() will return a refcounted node on success - thus for the success path the node must be explicitly released with a of_node_put(). Fixes: 0b05ac6e2480 ("powerpc/xics: Rewrite XICS driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1530691407-3991-1-git-send-email-hofrat@osadl.org Signed-off-by: Sasha Levin --- arch/powerpc/sysdev/xics/icp-hv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/xics/icp-hv.c b/arch/powerpc/sysdev/xics/icp-hv.c index ad8117148ea3b..21b9d1bf39ff6 100644 --- a/arch/powerpc/sysdev/xics/icp-hv.c +++ b/arch/powerpc/sysdev/xics/icp-hv.c @@ -174,6 +174,7 @@ int icp_hv_init(void) icp_ops = &icp_hv_ops; + of_node_put(np); return 0; }