aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/ccw-device.c3
-rw-r--r--hw/s390x/ccw-device.h2
-rw-r--r--hw/s390x/s390-ccw.c3
3 files changed, 4 insertions, 4 deletions
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
index fb8c1ac..a7d682e 100644
--- a/hw/s390x/ccw-device.c
+++ b/hw/s390x/ccw-device.c
@@ -31,9 +31,10 @@ static void ccw_device_refill_ids(CcwDevice *dev)
dev->subch_id.valid = true;
}
-static void ccw_device_realize(CcwDevice *dev, Error **errp)
+static bool ccw_device_realize(CcwDevice *dev, Error **errp)
{
ccw_device_refill_ids(dev);
+ return true;
}
static Property ccw_device_properties[] = {
diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h
index 6dff952..5feeb0e 100644
--- a/hw/s390x/ccw-device.h
+++ b/hw/s390x/ccw-device.h
@@ -36,7 +36,7 @@ extern const VMStateDescription vmstate_ccw_dev;
struct CCWDeviceClass {
DeviceClass parent_class;
void (*unplug)(HotplugHandler *, DeviceState *, Error **);
- void (*realize)(CcwDevice *, Error **);
+ bool (*realize)(CcwDevice *, Error **);
void (*refill_ids)(CcwDevice *);
};
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c
index a06e91d..4b8ede7 100644
--- a/hw/s390x/s390-ccw.c
+++ b/hw/s390x/s390-ccw.c
@@ -137,8 +137,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **errp)
goto out_err;
}
- ck->realize(ccw_dev, &err);
- if (err) {
+ if (!ck->realize(ccw_dev, &err)) {
goto out_err;
}