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

[Xen-devel] [PATCH] minios xc_evtchn_unbind missing return



minios: Error case when unbinding unknown port in xc_evtchn_unbind is
missing a return statement.

Signed-off-by: Diego Ongaro <diego.ongaro@xxxxxxxxxx>
---
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -259,8 +259,11 @@ int xc_evtchn_unbind(int xce_handle, evt
            files[xce_handle].evtchn.ports[i].port = -1;
            break;
        }
-    if (i == MAX_EVTCHN_PORTS)
+    if (i == MAX_EVTCHN_PORTS) {
        printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", 
port, xce_handle);
+       errno = -EINVAL;
+       return -1;
+    }
     files[xce_handle].evtchn.ports[i].bound = 0;
     unbind_evtchn(port);
     return 0;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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