]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390x/event-facility: fix error propagation
authorCornelia Huck <cohuck@redhat.com>
Tue, 21 Jan 2020 09:41:00 +0000 (10:41 +0100)
committerCornelia Huck <cohuck@redhat.com>
Mon, 27 Jan 2020 11:13:09 +0000 (12:13 +0100)
We currently check (by error) if the passed-in Error pointer errp
is non-null and return after realizing the first child of the
event facility in that case. Symptom is that 'virsh shutdown'
does not work, as the sclpquiesce device is not realized.

Fix this by (correctly) checking the local Error err.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations")
Message-Id: <20200121095506.8537-1-cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/event-facility.c

index 8a93b8a1da9704063dea0b9985f70255f4d7095c..9d6972afa8b333f39fdaf1b968d49df3d71cacec 100644 (file)
@@ -338,7 +338,7 @@ static void sclp_events_bus_realize(BusState *bus, Error **errp)
         DeviceState *dev = kid->child;
 
         object_property_set_bool(OBJECT(dev), true, "realized", &err);
-        if (errp) {
+        if (err) {
             error_propagate(errp, err);
             return;
         }