summary refs log tree commit diff stats
path: root/hw/vfio/pci.c
diff options
context:
space:
mode:
authorZhenzhong Duan <zhenzhong.duan@intel.com>2024-05-22 12:39:57 +0800
committerCédric Le Goater <clg@redhat.com>2024-05-22 10:04:21 +0200
commit455c009dc4ec13dab51c3764332433013b5cf3cb (patch)
treeb06637d85932377acb62c126377b19b680eb49e2 /hw/vfio/pci.c
parent9442d8af674c80a2f8a7358977e1fc7ed43d2776 (diff)
downloadfocaccia-qemu-455c009dc4ec13dab51c3764332433013b5cf3cb.tar.gz
focaccia-qemu-455c009dc4ec13dab51c3764332433013b5cf3cb.zip
vfio/display: Make vfio_display_*() return bool
This is to follow the coding standand in qapi/error.h to return bool
for bool-valued functions.

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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index c1adef5cf8..a447013a1d 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3200,8 +3200,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
     }
 
     if (vdev->display != ON_OFF_AUTO_OFF) {
-        ret = vfio_display_probe(vdev, errp);
-        if (ret) {
+        if (!vfio_display_probe(vdev, errp)) {
             goto out_deregister;
         }
     }