aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio-ccw.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/s390-virtio-ccw.c')
-rw-r--r--hw/s390x/s390-virtio-ccw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 07609a9..1a171f0 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -70,8 +70,7 @@ static S390CPU *s390x_new_cpu(const char *typename, uint32_t core_id,
S390CPU *cpu = S390_CPU(object_new(typename));
Error *err = NULL;
- object_property_set_int(OBJECT(cpu), "core-id", core_id, &err);
- if (err != NULL) {
+ if (!object_property_set_int(OBJECT(cpu), "core-id", core_id, &err)) {
goto out;
}
qdev_realize(DEVICE(cpu), NULL, &err);