diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-12-18 16:35:26 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-01-13 15:16:19 +0100 |
commit | 24da21f265b091dee756398a24d63dd8a2f3d5ab (patch) | |
tree | d4a1508b0f821ce2c4c64af799c6c2000171e33c | |
parent | e6da780d5f8e258f4a97631612d2b841faed4885 (diff) | |
download | qemu-24da21f265b091dee756398a24d63dd8a2f3d5ab.zip qemu-24da21f265b091dee756398a24d63dd8a2f3d5ab.tar.gz qemu-24da21f265b091dee756398a24d63dd8a2f3d5ab.tar.bz2 |
s390/sclp: Simplify control flow in sclp_realize()
Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-24-git-send-email-armbru@redhat.com>
-rw-r--r-- | hw/s390x/sclp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 9a117c9..74f2b40 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -463,21 +463,18 @@ static void sclp_realize(DeviceState *dev, Error **errp) object_property_set_bool(OBJECT(sclp->event_facility), true, "realized", &err); if (err) { - goto error; + goto out; } ret = s390_set_memory_limit(machine->maxram_size, &hw_limit); if (ret == -E2BIG) { error_setg(&err, "qemu: host supports a maximum of %" PRIu64 " GB", hw_limit >> 30); - goto error; } else if (ret) { error_setg(&err, "qemu: setting the guest size failed"); - goto error; } - return; -error: - assert(err); + +out: error_propagate(errp, err); } |