From: Cornelia Huck Date: Tue, 21 Jan 2020 09:41:00 +0000 (+0100) Subject: s390x/event-facility: fix error propagation X-Git-Tag: v5.0.0-rc0~124^2~10 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d6a9858d24df4fc8633e1c3cb7bf928b80b9685c;p=users%2Fdwmw2%2Fqemu.git s390x/event-facility: fix error propagation 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 Fixes: 3d508334dd2c ("s390x/event-facility: Fix realize() error API violations") Message-Id: <20200121095506.8537-1-cohuck@redhat.com> Reviewed-by: David Hildenbrand Tested-by: Christian Borntraeger Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster Signed-off-by: Cornelia Huck --- diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 8a93b8a1da..9d6972afa8 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -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; }