diff options
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r-- | hw/s390x/sclp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 03364343eb..a0ce444b4b 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -329,7 +329,6 @@ static void sclp_realize(DeviceState *dev, Error **errp) { MachineState *machine = MACHINE(qdev_get_machine()); SCLPDevice *sclp = SCLP(dev); - Error *err = NULL; uint64_t hw_limit; int ret; @@ -338,20 +337,17 @@ static void sclp_realize(DeviceState *dev, Error **errp) * as we can't find a fitting bus via the qom tree, we have to add the * event facility to the sysbus, so e.g. a sclp console can be created. */ - if (!sysbus_realize(SYS_BUS_DEVICE(sclp->event_facility), &err)) { - goto out; + if (!sysbus_realize(SYS_BUS_DEVICE(sclp->event_facility), errp)) { + return; } ret = s390_set_memory_limit(machine->maxram_size, &hw_limit); if (ret == -E2BIG) { - error_setg(&err, "host supports a maximum of %" PRIu64 " GB", + error_setg(errp, "host supports a maximum of %" PRIu64 " GB", hw_limit / GiB); } else if (ret) { - error_setg(&err, "setting the guest size failed"); + error_setg(errp, "setting the guest size failed"); } - -out: - error_propagate(errp, err); } static void sclp_memory_init(SCLPDevice *sclp) |