diff options
author | Greg Kurz <groug@kaod.org> | 2020-08-06 18:56:13 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-08-12 13:16:27 +1000 |
commit | e781139539f3d73ac00f2aea17f5a154b10e4302 (patch) | |
tree | 98f6f942cae578d86702a295024ba3e97fbf3ed9 /hw/intc | |
parent | 82f086b5e7ec0adff5a3972f74c446325b4fef9a (diff) |
spapr/xive: Simplify kvmppc_xive_disconnect()
Since this function begins with:
/* The KVM XIVE device is not in use */
if (!xive || xive->fd == -1) {
return;
}
we obviously don't need to check xive->fd again.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159673297296.766512.14780055521619233656.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/spapr_xive_kvm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c index d55ea4670e..893a1ee77e 100644 --- a/hw/intc/spapr_xive_kvm.c +++ b/hw/intc/spapr_xive_kvm.c @@ -873,10 +873,8 @@ void kvmppc_xive_disconnect(SpaprInterruptController *intc) * and removed from the list of devices of the VM. The VCPU * presenters are also detached from the device. */ - if (xive->fd != -1) { - close(xive->fd); - xive->fd = -1; - } + close(xive->fd); + xive->fd = -1; kvm_kernel_irqchip = false; kvm_msi_via_irqfd_allowed = false; |