[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/11] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_reali
From: |
Thomas Huth |
Subject: |
[PULL 05/11] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize() |
Date: |
Mon, 24 Jun 2024 11:10:37 +0200 |
From: Cédric Le Goater <clg@redhat.com>
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>
---
hw/vfio/ccw.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 9a8e052711..a468fa2342 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)
--
2.45.2
- [PULL 00/11] s390x and qtest patches 2024-06-24, Thomas Huth, 2024/06/24
- [PULL 01/11] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool, Thomas Huth, 2024/06/24
- [PULL 02/11] s390x/css: Make CCWDeviceClass::realize return bool, Thomas Huth, 2024/06/24
- [PULL 04/11] s390x/css: Make S390CCWDeviceClass::realize return bool, Thomas Huth, 2024/06/24
- [PULL 06/11] vfio/ccw: Fix the missed unrealize() call in error path, Thomas Huth, 2024/06/24
- [PULL 05/11] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize(),
Thomas Huth <=
- [PULL 03/11] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize(), Thomas Huth, 2024/06/24
- [PULL 08/11] tests/qtest/fuzz: fix memleak in qos_fuzz.c, Thomas Huth, 2024/06/24
- [PULL 10/11] MAINTAINERS: Cover all tests/qtest/migration-* files, Thomas Huth, 2024/06/24
- [PULL 09/11] target/s390x/arch_dump: use correct byte order for pid, Thomas Huth, 2024/06/24
- [PULL 11/11] target/s390x: Add a CONFIG switch to disable legacy CPUs, Thomas Huth, 2024/06/24
- [PULL 07/11] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors, Thomas Huth, 2024/06/24
- Re: [PULL 00/11] s390x and qtest patches 2024-06-24, Richard Henderson, 2024/06/24