diff options
author | Greg Kurz <groug@kaod.org> | 2020-08-06 18:56:05 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-08-12 13:16:27 +1000 |
commit | 82f086b5e7ec0adff5a3972f74c446325b4fef9a (patch) | |
tree | 765b208e434fcd3cf6c2e8eb27e360759b7e6e6b /hw/core | |
parent | c55bcb1f47071a134a4b96b4137cccca831ac5cf (diff) |
spapr/xive: Fix xive->fd if kvm_create_device() fails
If the creation of the KVM XIVE device fails for some reasons, the
negative errno ends up in xive->fd, but the rest of the code assumes
that xive->fd either contains an open fd, ie. positive value, or -1.
This doesn't cause any misbehavior except kvmppc_xive_disconnect()
that will try to close(xive->fd) during rollback and likely be
rewarded with an EBADF.
Only set xive->fd with a open fd.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159673296585.766512.15404407281299745442.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/core')
0 files changed, 0 insertions, 0 deletions