Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2511588imm; Mon, 24 Sep 2018 05:42:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaMWaueW/SpKklKz6YUtoK4hKfJu36o/EoWi4dwrPtcZcdlqy7KL7b23nEDUgK4VRuFb9cM X-Received: by 2002:a62:1d16:: with SMTP id d22-v6mr3616559pfd.159.1537792968917; Mon, 24 Sep 2018 05:42:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792968; cv=none; d=google.com; s=arc-20160816; b=brw27lFPdCza68PnazHh6w47ZuO7jlwn1qlLXOVF/6G9sBmbn/Iy3WEdIqg5c57I7F 3RT1OekEV8rp1TnjyEPFqQeKlM1zGwnlbSGJzbeBKve41j66b7TAnGoeOoRGcm2CcoF2 6ZlpLRa06NGovcazS2Q39CjpCZ09S/U6w3SzS9GsqyvaRmrRY1WcRtJMiKoo+IW4ORnB Vf0x0ahpkpYiR4S4xsniZyeY7IEo6wEiW+x9Q+BSAzHqFJYwijEEW0XqT/m9FODxCPoH NLrpQf9izIkLbDS1BU1XjCTLyX5ufD771LwTii1mzTxjjBLMXkM62ef/yjNIWMmQeakR HFmg== 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=xYA9a6iqnR0yAFiPTLF2k0MJq+YISRcyXMI8FoW570g=; b=fATqr/prSazvToeh5A32rQxTzKy4smGwBKHiDtIWisc5b0+jC03Vy6d2yonV74znth jnzEyRlciK+YmeZmTS7gimf4UAZ+SO4Qxk1VU61T8obLylpyrymRxJYfvR0lH/KXXyhs s3YCnap4hebgHp8XAk1NtO5+NI+luWdykydwjsnu2e2BLaFpTpkXLoLJmO1gO74Gt2aH ylbfeVpr+yhatHaFS5fcc6lGTtDBfv7lxkkmT8e2g2uF29LKctUWBXvHXyUNAD+y3rLU 5Go846FJ3iQLRsjuDevrGcOy8LuavBcUnT8Tu/5+JhfHwVJSP47yW8nM4XLd1yWvtTCR WGhA== 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 q1-v6si35131697plb.35.2018.09.24.05.42.33; Mon, 24 Sep 2018 05:42:48 -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 S2388578AbeIXSmS (ORCPT + 99 others); Mon, 24 Sep 2018 14:42:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58962 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733259AbeIXSmR (ORCPT ); Mon, 24 Sep 2018 14:42:17 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8F449109C; Mon, 24 Sep 2018 12:40:19 +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.18 156/235] KVM: PPC: Book3S HV: Add of_node_put() in success path Date: Mon, 24 Sep 2018 13:52:22 +0200 Message-Id: <20180924113120.871716105@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@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.18-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 @@ -4562,6 +4562,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