From 59f7d6743ccbe17587e491dc5d79cad8bf31f76a Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Mon, 17 Oct 2016 10:58:00 -0600 Subject: vfio: Pass an error object to vfio_get_device Pass an error object to prepare for migration to VFIO-PCI realize. In vfio platform vfio_base_device_init we currently just report the error. Subsequent patches will propagate the error up to the realize function. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/vfio/platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/vfio/platform.c') diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 7bf525b918..9014ea7402 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -607,11 +607,10 @@ static int vfio_base_device_init(VFIODevice *vbasedev) return -EBUSY; } } - ret = vfio_get_device(group, vbasedev->name, vbasedev); + ret = vfio_get_device(group, vbasedev->name, vbasedev, &err); if (ret) { - error_report("vfio: failed to get device %s", vbasedev->name); vfio_put_group(group); - return ret; + goto error; } ret = vfio_populate_device(vbasedev); -- cgit 1.4.1