From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Ongaro Subject: [PATCH] minios xc_evtchn_unbind missing return Date: Fri, 01 Aug 2008 00:48:19 +0100 Message-ID: <48924F43.8060805@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org minios: Error case when unbinding unknown port in xc_evtchn_unbind is missing a return statement. Signed-off-by: Diego Ongaro --- 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;