Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1112451pxx; Tue, 27 Oct 2020 08:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6Hgmyv8/RKzQtIVNKW164pW7F9yuPaSz6cH18l3KrcrOHyvhCHCTv1loa2gDnAKKeQYFv X-Received: by 2002:a17:906:abcf:: with SMTP id kq15mr2890613ejb.208.1603812685878; Tue, 27 Oct 2020 08:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603812685; cv=none; d=google.com; s=arc-20160816; b=ChaSBmgew90rbrJauKFmbP1W3XykD4yq9who+OoNmc4ZcG6bYais0JT9Nxf/G09guh IAIMm4BqlEPPUiXydWRGwNmO/KfNUUldk/+65XePglaCoERuwLrkoUNec7adNtz7okGo FBeBkAsq3CyEGA04cPdgS+uwOtAEpXDwKHrXH3XZHRRgsRgx1E7Uskl0sbTTVFFuzRqk Lt5rNbRD/1F8kBcdysztM4JpzfhJIL5sJV93ROuXJYJenNb6DPXTqYV6NnbjlKX53VNO Ivrir2jmhjwX09ufTCQUI/CyXhP/HEigTzFX1iMXkTxW7ptEddY45VHLw/sPN067ZQfZ oqFg== 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=eBn8DUCIi6vPqNVv46yuq61zgX7RvXBbSJVTkdzuPjo=; b=VLucjlt1CXhacf3SUGP7Gy9ofhGosin9cB2XapB9VB4pjkgWWPDpmC6NlEJSBFwnlR v7Bz132f1JBf51aeYQZbl0k1XnAtQ4nEyuBoZEhxFnhIWSWyS6ZwzyjKaCAlYOd4ZxLs h/P11/lp1h2JlLWHfjMf4Ek1eP7D02Sys63mLHKjSOp9KWyoAjT9GOu0rCLdX4MOUAUO BLQkkmBoP4Ixvvz3fahdXNTAAHJuGv+fJHm+oaEIFKiK6vS3PrvCgakyXvP0gae7igpX 6xLP8Zn/rr5owrOQzWmfOs404qgXifMsCwnN/elf0EXqyTeDegwaEkGYRJmd7sN7YKKI sGnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wORgtNHo; 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 kt22si1246683ejb.648.2020.10.27.08.31.03; Tue, 27 Oct 2020 08:31:25 -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=wORgtNHo; 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 S1757362AbgJ0Ohg (ORCPT + 99 others); Tue, 27 Oct 2020 10:37:36 -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 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 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; } -- 2.25.1