Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp596384pxx; Wed, 28 Oct 2020 12:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFWrVxGMZBPiTqOJSvJvZaPpszRzKgiOV/2tjzTSx1y6bZ3LaBCQ1dvR4jHl7WZ4lIJr3H X-Received: by 2002:a17:906:b0d6:: with SMTP id bk22mr498596ejb.153.1603911696019; Wed, 28 Oct 2020 12:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603911696; cv=none; d=google.com; s=arc-20160816; b=PDOiz54U5is74VqM6X/2cC4SG0dYWpf8KWbHbH181WMNYkTjzI0mj5E9ORHFgzpw8p 94VT0lWcb00ySTAFxLxytzYTHVBKyQVCNM1YjNnPI+XtcMuD5Cz6mmEqsg9lps5wJHm/ WjT7/zKvQM0ic1xUmoESYx08RfcruTZmY+TdJI2ZPsCQfW/q5IR6yXcxiTg4xuiF4L34 nmMs93EfuxZowujA2xIDy2FX8OVXsWNCsoLAW3IQNFcOC960JRaPD3dcLg9hTyRnzIlE bTi91o/d5sSkOdFOcgxsoRm1fLFV+51xlb/WbecN97ZSLNnUjXHQ095wrq1YNvzMn5H7 GgzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ig31Q6LzsUYZ3D2cVpLS2/Kj2AdAF4IDYgDtxNrhmk4=; b=mh4zZ6sAILI1Pxh4Js2BdwNBXg9Svk0hQvsI01hmrvrD14m3CbH71nCqZb7jruVPVt WzFyiYvCfAgzaDkK2xnbMP5gZrdZBB1StfAxbdtrFgVX1budJlRPDujL984VPpa+LY6t 0md9nj0DccwgKwbFXdrKC60zoISCI/QLJbfSP0+/roEQ5fnAfSpdXegecfOS8ia85fFH EXK88Cc+EKH0s70ceMAWXzG468DQfOVXRUEVnGRLCzRcJPUW5Em3NKJdZ76FActQmcZ5 zdbu8fF0sxf4EBsBBNccN7ltFNcTkcOmwLWjNWSjLnPZeDfy1AWxdAVuP03MDqEhonSM +uqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bdRg0ZV/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si30775edp.57.2020.10.28.12.01.13; Wed, 28 Oct 2020 12:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bdRg0ZV/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1826133AbgJ0SQb (ORCPT + 99 others); Tue, 27 Oct 2020 14:16:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:60744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756206AbgJ0OMA (ORCPT ); Tue, 27 Oct 2020 10:12:00 -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 AE623218AC; Tue, 27 Oct 2020 14:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807915; bh=0mN8TmZOcC4Y0B6sUPhKksNVA2GHXtJ7Blbbkn+Cw+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bdRg0ZV//jusfY/G9X6tqBLSfZ24wJeipWWxPqB/VpwilDrSUC5LH9+E7mL3SzTUg Yh/9+Yznzz4pov+3ZdnhbkNr+UWgpJN/AScIS1+WyeqKpzQOZHgBqpO6aE94CQTuhV AU7PRIyPPJmpkNbl5Q4AoLAilv+bhiHFqDk7KWtU= 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 4.14 088/191] powerpc/icp-hv: Fix missing of_node_put() in success path Date: Tue, 27 Oct 2020 14:49:03 +0100 Message-Id: <20201027134913.923916173@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 bbc839a98c414..003deaabb5680 100644 --- a/arch/powerpc/sysdev/xics/icp-hv.c +++ b/arch/powerpc/sysdev/xics/icp-hv.c @@ -179,6 +179,7 @@ int icp_hv_init(void) icp_ops = &icp_hv_ops; + of_node_put(np); return 0; } -- 2.25.1