I think following change should be enough along with your suggested changes:

diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 1a5d1611f2cd..27fed3cd463c 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -378,8 +378,7 @@ vfio_spapr_container_add_section_window(VFIOContainerBase 
*bcontainer,
      }
ret = vfio_spapr_create_window(container, section, &pgsize);
-    if (ret) {
-        error_setg_errno(errp, -ret, "Failed to create SPAPR window");
+    if (!ret) {
          return false;
      }

I think you mean :

    if (!vfio_spapr_create_window(container, section, &pgsize, errp)) {
        return false;
    }

if so, yes. This is the current practice in QEMU.

Thanks,

C.


Reply via email to