aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2024-05-22 19:01:05 +0200
committerThomas Huth <thuth@redhat.com>2024-06-24 08:03:34 +0200
commit1aeebbd6213af1aef09b4906c487f9079a5d8947 (patch)
tree990c7a21905a44bd927b4ce5f00aecba6d3fde69
parent45f4218784ce20b2c303dd07b1fa3aa6838eca73 (diff)
downloadqemu-1aeebbd6213af1aef09b4906c487f9079a5d8947.zip
qemu-1aeebbd6213af1aef09b4906c487f9079a5d8947.tar.gz
qemu-1aeebbd6213af1aef09b4906c487f9079a5d8947.tar.bz2
vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize()
The local error variable is kept for vfio_ccw_register_irq_notifier() because it is not considered as a failing condition. We will change how error reporting is done in following changes. Remove the error_propagate() call. Cc: Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240522170107.289532-6-clg@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--hw/vfio/ccw.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 9a8e052..a468fa2 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -582,8 +582,8 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
/* Call the class init function for subchannel. */
if (cdc->realize) {
- if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, &err)) {
- goto out_err_propagate;
+ if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, errp)) {
+ return;
}
}
@@ -596,17 +596,17 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
goto out_attach_dev_err;
}
- if (!vfio_ccw_get_region(vcdev, &err)) {
+ if (!vfio_ccw_get_region(vcdev, errp)) {
goto out_region_err;
}
- if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, &err)) {
+ if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, errp)) {
goto out_io_notifier_err;
}
if (vcdev->crw_region) {
if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX,
- &err)) {
+ errp)) {
goto out_irq_notifier_err;
}
}
@@ -634,8 +634,6 @@ out_attach_dev_err:
if (cdc->unrealize) {
cdc->unrealize(cdev);
}
-out_err_propagate:
- error_propagate(errp, err);
}
static void vfio_ccw_unrealize(DeviceState *dev)