mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
s390x/event-facility: Fix realize() error API violations
sclp_events_bus_realize() dereferences @errp when
object_property_set_bool() fails. That's wrong; see the big comment
in error.h. Introduced in commit f6102c329c "s390/sclp: rework sclp
event facility initialization + device realization".
No caller actually passes null.
Fix anyway: splice in a local Error *err, and error_propagate().
Cc: David Hildenbrand <[email protected]>
Cc: Cornelia Huck <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
This commit is contained in:
1 parent
e893baee70
commit
3d508334dd
1 file changed
+4
-2
@@ -339,14 +339,16 @@ out:
|
||||
|
||||
static void sclp_events_bus_realize(BusState *bus, Error **errp)
|
||||
{
|
||||
Error *err = NULL;
|
||||
BusChild *kid;
|
||||
|
||||
/* TODO: recursive realization has to be done in common code */
|
||||
QTAILQ_FOREACH(kid, &bus->children, sibling) {
|
||||
DeviceState *dev = kid->child;
|
||||
|
||||
object_property_set_bool(OBJECT(dev), true, "realized", errp);
|
||||
if (*errp) {
|
||||
object_property_set_bool(OBJECT(dev), true, "realized", &err);
|
||||
if (errp) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user