tools/libs/light: don't set errno to a negative value
authorJuergen Gross <jgross@suse.com>
Tue, 7 Jun 2022 12:01:44 +0000 (14:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jun 2022 12:01:44 +0000 (14:01 +0200)
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>
master commit: 2419a159fb943c24a6f2439604b9fdb1478fcd08
master date: 2022-04-22 20:39:34 +0100

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;
         }