[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 20/21] hw/vfio/ap: drop local_err from vfio_ap_realize
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v7 20/21] hw/vfio/ap: drop local_err from vfio_ap_realize |
Date: |
Thu, 5 Dec 2019 18:20:18 +0300 |
No reason for local_err here, use errp directly instead.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
hw/vfio/ap.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index da6a20669d..8fbaa724c2 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -89,14 +89,13 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
{
int ret;
char *mdevid;
- Error *local_err = NULL;
VFIOGroup *vfio_group;
APDevice *apdev = AP_DEVICE(dev);
VFIOAPDevice *vapdev = VFIO_AP_DEVICE(apdev);
- vfio_group = vfio_ap_get_group(vapdev, &local_err);
+ vfio_group = vfio_ap_get_group(vapdev, errp);
if (!vfio_group) {
- goto out_err;
+ return;
}
vapdev->vdev.ops = &vfio_ap_ops;
@@ -113,7 +112,7 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
*/
vapdev->vdev.balloon_allowed = true;
- ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
+ ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, errp);
if (ret) {
goto out_get_dev_err;
}
@@ -123,8 +122,6 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
out_get_dev_err:
vfio_ap_put_device(vapdev);
vfio_put_group(vfio_group);
-out_err:
- error_propagate(errp, local_err);
}
static void vfio_ap_unrealize(DeviceState *dev, Error **errp)
--
2.21.0
- [PATCH v7 19/21] backends/cryptodev: drop local_err from cryptodev_backend_complete(), (continued)
- [PATCH v7 19/21] backends/cryptodev: drop local_err from cryptodev_backend_complete(), Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 13/21] monitor/qmp-cmds: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 06/21] qdev-monitor: well form error hint helpers, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 04/21] hmp: drop Error pointer indirection in hmp_handle_error, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 08/21] 9pfs: well form error hint helpers, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 09/21] hw/core/qdev: cleanup Error ** variables, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 20/21] hw/vfio/ap: drop local_err from vfio_ap_realize,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v7 11/21] hw/i386/amd_iommu: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 10/21] block/snapshot: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 14/21] hw/s390x: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 12/21] qga: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 18/21] include/qom/object.h: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 17/21] hw/usb: rename Error ** parameter to more common errp, Vladimir Sementsov-Ogievskiy, 2019/12/05
- [PATCH v7 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error, Vladimir Sementsov-Ogievskiy, 2019/12/05