Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2487209imm; Mon, 24 Sep 2018 05:19:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ1pGO2WvPP88ShxmxBkaXQ7QCIuRJkhuhsTUhZCpYfCvOUzjfmU9dQSYZoHrcFLKJxn2We X-Received: by 2002:a62:1c06:: with SMTP id c6-v6mr1610521pfc.41.1537791599289; Mon, 24 Sep 2018 05:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537791599; cv=none; d=google.com; s=arc-20160816; b=BC+GN8QXPKiupaHauZ4tm+sSOoK9zd7hBcAS2VIwRR5ANl/DecM2WvpYi0d8pNU/Ux D7H06fTmmWXP0TghWxLXu3lngeYqBjEF9gim96Gf/ZeElTZJX5+x2zQgfkswB8bXzjrh I5RA3pxBldA6hXMDugHaS2M50uxv01f6vdtNenekQtKRz5fdHOPmdUwIgUguGgTS+PE9 Ka2qbSZXEV02KwUpBo8vUFCpKDfUNwQJeMxwzPZXsJY2oJjOJUcWDLInG4tumLCVyqbW 6/0wx5cRXFa8nU6Mu3qXOX8y8CNT+dji5DqTZOpYeMXNhWVjj5/Y2qcaS2jw993ewHQL UtIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=i1h1fRFmkm+hxHnXEmKKql5Z2Q7ggTsGwnRVhqsL2Sc=; b=XOmJK614PseIb+uG7sfJuGoXL5EA3bjcqTewt6hhYKvkRpFwsM5SbA4cnVUkyMTcXw Nab8JjNc0aemVi7nYLCZKZslHHiTW+UOE4AZk6QwG3XrgRUOtMWt3Rgozje80MmLkWmA 44nqGZkL1UNoALx25XEmGfsxHYD0Im7CmNr9LTk0K/j9XvoVvRpdAJ9B8MpnA2Om2B2t 1u5l2SbbOKi3C0AAP7DZ7GrgWZVKSewuE5qlgA2Wf3IZhRDcrBylgWf3tEdrlay2Y+Pi MNP/nnlvTmTW1C4w97jMMbL1tLD7SYonISIZWsnw9LtLT+p1hrOg2YAh9JA3IodokxcA t1JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20-v6si31714801pgk.393.2018.09.24.05.19.44; Mon, 24 Sep 2018 05:19:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732718AbeIXSUs (ORCPT + 99 others); Mon, 24 Sep 2018 14:20:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56204 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730495AbeIXSUr (ORCPT ); Mon, 24 Sep 2018 14:20:47 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 284FC107E; Mon, 24 Sep 2018 12:18:54 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Mc Guire , Paul Mackerras , Sasha Levin Subject: [PATCH 4.14 115/173] KVM: PPC: Book3S HV: Add of_node_put() in success path Date: Mon, 24 Sep 2018 13:52:29 +0200 Message-Id: <20180924113124.522959041@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113114.334025954@linuxfoundation.org> References: <20180924113114.334025954@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Mc Guire [ Upstream commit 51eaa08f029c7343df846325d7cf047be8b96e81 ] The call to of_find_compatible_node() is returning a pointer with incremented refcount so it must be explicitly decremented after the last use. As here it is only being used for checking of node presence but the result is not actually used in the success path it can be dropped immediately. Signed-off-by: Nicholas Mc Guire Fixes: commit f725758b899f ("KVM: PPC: Book3S HV: Use OPAL XICS emulation on POWER9") Signed-off-by: Paul Mackerras Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -4356,6 +4356,8 @@ static int kvmppc_book3s_init_hv(void) pr_err("KVM-HV: Cannot determine method for accessing XICS\n"); return -ENODEV; } + /* presence of intc confirmed - node can be dropped again */ + of_node_put(np); } #endif