]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
tools/libs/light: don't set errno to a negative value
authorJuergen Gross <jgross@suse.com>
Wed, 20 Apr 2022 07:31:19 +0000 (09:31 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2022 19:39:34 +0000 (20:39 +0100)
Setting errno to a negative value makes no sense.

Fixes: e78e8b9bb649 ("libxl: Add interface for querying hypervisor about PCI topology")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/light/libxl_linux.c

index 8d62dfd255cba1a45a1f4f7f3ef9d442e847744d..27f2bce71837ebd6f8ca59ce0c2b79480fe323cf 100644 (file)
@@ -288,7 +288,7 @@ int libxl__pci_topology_init(libxl__gc *gc,
         if (i == num_devs) {
             LOG(ERROR, "Too many devices");
             err = ERROR_FAIL;
-            errno = -ENOSPC;
+            errno = ENOSPC;
             goto out;
         }