Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp170095pxx; Wed, 28 Oct 2020 01:28:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmrlcMUOF1gl7VoZq7hbkORrch1h6B0esK3XWzhRGMJVxUQAJ4GHE3I8lkXfJYgvvqwxYC X-Received: by 2002:a50:83e5:: with SMTP id 92mr6731603edi.307.1603873709653; Wed, 28 Oct 2020 01:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603873709; cv=none; d=google.com; s=arc-20160816; b=C19q0xcrP+hpsDe0iwK4sDzALgQa7IhHrres+ifkwSK7ANyxxQ9Jyz9QfvgCNfr75A wXInjYq51LwCfXaw6wVQM9AcooxblfSd97Hpust4UlNcHwWfCsvOXV6RMYo0dIQNIT75 SNMSTje4efUNlivJuUPG0BUgbxWgB1lZRSuF5ZWnQw8p8XE4uqT36Q8VnqMkPZgejJXK eZaQ1ogB0pHeMko+zpoNI7fMjnRgHbMXEz/3PyDa+14rJeBy1bWCNjBPsUhN3jcNNsCI FmYNokWwc/Ltl92e8RcDyH6aJamfSw/O3g6wpqsvuTtdRa4PUahh5WJs9by16kDTWt8i ym9Q== 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=lmmgbZuwWyYusqZqtRWBuIgmU3EFw8PyNolQqzFb8f0=; b=x/yJzBL039wb+mVXzW1UlQ0DmMtY/ms7BkCz5SaWVJ4XNbCaAHyeyZWtkZ+ruegNj1 qxdG8tThZx8/VZMUC9psZXnOGeYJix4NYFCaJxMg6LHKXuN/M40h55bweXjsqjfMxDDf WNwfyZ3PafWFoWhe2H+F22JMFKHFh0IHxxCLipmAmi6TZJhX/hjTpfSYVNEkrpx+fiOE tV99Oc57/rVIHepMq+1+gAJHtkzNZ4vIpp8ZxHVi+/sHZpaQmpPXRmpN6WSV8h/gQf7A QYv11KITQhRb9W5WGTZamyyaVa5OklYqCswZoA/dADGm/5p5IC7aRcF5v6yg22XuMWPR HHEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ElTwGtXw; 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 z8si2802677eju.267.2020.10.28.01.28.06; Wed, 28 Oct 2020 01:28:29 -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=ElTwGtXw; 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 S2440792AbgJ0OEX (ORCPT + 99 others); Tue, 27 Oct 2020 10:04:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:52524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504843AbgJ0OEP (ORCPT ); Tue, 27 Oct 2020 10:04:15 -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 9189922258; Tue, 27 Oct 2020 14:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807455; bh=R+lkFCQzzaufUJC/QvkrhHlktGaX/olfLwZnyfo/ApM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ElTwGtXwrf4huToUlF8AygHLeoCSAj9gBpvoMRZuoDcTGMLa4aZ4wNz4ehk76aASV 7qZDpfOktxZXLnAYd9zkdF7RVVsN6JDMj0JlYqoMdUC3yU598Ruoxrrrmia/QQF1MY psTFWMIr6pR8/q52UKtedlPqfos2g2iuFgpLlEbM= 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.9 059/139] powerpc/icp-hv: Fix missing of_node_put() in success path Date: Tue, 27 Oct 2020 14:49:13 +0100 Message-Id: <20201027134904.929942918@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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 e7fa26c4ff73e..d3a0322ee3276 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