From: Juergen Gross Date: Wed, 20 Apr 2022 07:31:19 +0000 (+0200) Subject: tools/libs/light: don't set errno to a negative value X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2419a159fb943c24a6f2439604b9fdb1478fcd08;p=people%2Froyger%2Fxen.git 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 Acked-by: Andrew Cooper --- 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; }