diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-12-05 20:46:34 +0300 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-12-18 08:43:19 +0100 |
commit | b5e45b0f48ae837d693230809d97615bc0862832 (patch) | |
tree | 586e077b0ff604008bff835f9ed96d4efcf59d10 /hw/vfio | |
parent | 7dc75edb0399677e4fb45c8103d77e56ae60e34d (diff) |
hw/vfio/ap: drop local_err from vfio_ap_realize
No reason for local_err here, use errp directly instead.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20191205174635.18758-21-vsementsov@virtuozzo.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r-- | hw/vfio/ap.c | 9 |
1 files 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) |