diff options
| author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2024-05-22 12:40:11 +0800 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2024-05-22 10:04:22 +0200 |
| commit | 0a0bda0acd529161d5cbed6c603ab89674a9af8c (patch) | |
| tree | 809aec09cdae42f226ca5b3f1166d4f4cc1bab35 /hw/vfio/pci.c | |
| parent | d3c6a18bc7affd3b89903d98d8a3125a3e1c9861 (diff) | |
| download | focaccia-qemu-0a0bda0acd529161d5cbed6c603ab89674a9af8c.tar.gz focaccia-qemu-0a0bda0acd529161d5cbed6c603ab89674a9af8c.zip | |
vfio/pci-quirks: Make vfio_add_*_cap() return bool
This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Include below functions: vfio_add_virt_caps() vfio_add_nv_gpudirect_cap() vfio_add_vmd_shadow_cap() 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/pci.c')
| -rw-r--r-- | hw/vfio/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 76a3931dba..35ad9b582f 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2194,8 +2194,7 @@ static bool vfio_add_std_cap(VFIOPCIDevice *vdev, uint8_t pos, Error **errp) vdev->emulated_config_bits[PCI_CAPABILITY_LIST] = 0xff; vdev->emulated_config_bits[PCI_STATUS] |= PCI_STATUS_CAP_LIST; - ret = vfio_add_virt_caps(vdev, errp); - if (ret) { + if (!vfio_add_virt_caps(vdev, errp)) { return false; } } |