提交 24da21f2 编写于 作者: M Markus Armbruster

s390/sclp: Simplify control flow in sclp_realize()

Suggested-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-24-git-send-email-armbru@redhat.com>
上级 e6da780d
...@@ -463,21 +463,18 @@ static void sclp_realize(DeviceState *dev, Error **errp) ...@@ -463,21 +463,18 @@ static void sclp_realize(DeviceState *dev, Error **errp)
object_property_set_bool(OBJECT(sclp->event_facility), true, "realized", object_property_set_bool(OBJECT(sclp->event_facility), true, "realized",
&err); &err);
if (err) { if (err) {
goto error; goto out;
} }
ret = s390_set_memory_limit(machine->maxram_size, &hw_limit); ret = s390_set_memory_limit(machine->maxram_size, &hw_limit);
if (ret == -E2BIG) { if (ret == -E2BIG) {
error_setg(&err, "qemu: host supports a maximum of %" PRIu64 " GB", error_setg(&err, "qemu: host supports a maximum of %" PRIu64 " GB",
hw_limit >> 30); hw_limit >> 30);
goto error;
} else if (ret) { } else if (ret) {
error_setg(&err, "qemu: setting the guest size failed"); error_setg(&err, "qemu: setting the guest size failed");
goto error;
} }
return;
error: out:
assert(err);
error_propagate(errp, err); error_propagate(errp, err);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册