All of lore.kernel.org
 help / color / mirror / Atom feed
From: Diego Ongaro <diego.ongaro@citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] minios xc_evtchn_unbind missing return
Date: Fri, 01 Aug 2008 00:48:19 +0100	[thread overview]
Message-ID: <48924F43.8060805@citrix.com> (raw)

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;

                 reply	other threads:[~2008-07-31 23:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48924F43.8060805@citrix.com \
    --to=diego.ongaro@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.