aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/kvm
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-04-12 19:51:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2023-06-07 22:47:56 +0300
commit6a69a58b1cc7caac0e0dd9bfa09f274fb35e8d46 (patch)
tree42ef629ea2e315b1b2237195da3e29eff72b7e29 /hw/i386/kvm
parent1797de7f825fb42118eaee55b874c2230b89e412 (diff)
hw/xen: Fix broken check for invalid state in xs_be_open()
Coverity points out that if (!s && !s->impl) isn't really what we intended to do here. CID 1508131. Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230412185102.441523-6-dwmw2@infradead.org> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> (cherry picked from commit c9bdfe8d587c1a6a8fc2e0ff97343745a9f5f247) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/i386/kvm')
-rw-r--r--hw/i386/kvm/xen_xenstore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 900679af8a..65f91e87d7 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -1688,7 +1688,7 @@ static struct qemu_xs_handle *xs_be_open(void)
XenXenstoreState *s = xen_xenstore_singleton;
struct qemu_xs_handle *h;
- if (!s && !s->impl) {
+ if (!s || !s->impl) {
errno = -ENOSYS;
return NULL;
}