diff options
| author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2024-05-07 14:42:44 +0800 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2024-05-16 16:59:20 +0200 |
| commit | b77548355ab5d8c8377ba8f981c7c597507de37a (patch) | |
| tree | e70d40f836675b943ee765c32bf6b7f41b89b029 /hw/vfio/ccw.c | |
| parent | f3758413b77d396dd4db68643f7068fb49ec77d9 (diff) | |
| download | focaccia-qemu-b77548355ab5d8c8377ba8f981c7c597507de37a.tar.gz focaccia-qemu-b77548355ab5d8c8377ba8f981c7c597507de37a.zip | |
vfio: Make VFIOIOMMUClass::attach_device() and its wrapper return bool
Make VFIOIOMMUClass::attach_device() and its wrapper function vfio_attach_device() return bool. This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/ccw.c')
| -rw-r--r-- | hw/vfio/ccw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 1c630f6e9a..89bb980167 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -579,7 +579,6 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp) S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev); VFIODevice *vbasedev = &vcdev->vdev; Error *err = NULL; - int ret; /* Call the class init function for subchannel. */ if (cdc->realize) { @@ -593,9 +592,8 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp) return; } - ret = vfio_attach_device(cdev->mdevid, vbasedev, - &address_space_memory, errp); - if (ret) { + if (!vfio_attach_device(cdev->mdevid, vbasedev, + &address_space_memory, errp)) { goto out_attach_dev_err; } |