[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.15] tools/libs/light: don't set errno to a negative value



commit 2e6062aa824e763407e1505cfdf0c71ce0f515ca
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Jun 7 14:17:37 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jun 7 14:17:37 2022 +0200

    tools/libs/light: don't set errno to a negative value
    
    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@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 2419a159fb943c24a6f2439604b9fdb1478fcd08
    master date: 2022-04-22 20:39:34 +0100
---
 tools/libs/light/libxl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libs/light/libxl_linux.c b/tools/libs/light/libxl_linux.c
index 8d62dfd255..27f2bce718 100644
--- a/tools/libs/light/libxl_linux.c
+++ b/tools/libs/light/libxl_linux.c
@@ -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;
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.15



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.