Diego Ongaro
2008-Jul-31 23:48 UTC
[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@citrix.com> --- 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@lists.xensource.com http://lists.xensource.com/xen-devel