aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/mini-os/events.c')
-rw-r--r--extras/mini-os/events.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c
index 51a3cc24f0..f47fc38822 100644
--- a/extras/mini-os/events.c
+++ b/extras/mini-os/events.c
@@ -58,9 +58,12 @@ void unbind_all_ports(void)
int do_event(evtchn_port_t port, struct pt_regs *regs)
{
ev_action_t *action;
+
+ clear_evtchn(port);
+
if (port >= NR_EVS) {
printk("Port number too large: %d\n", port);
- goto out;
+ return 1;
}
action = &ev_actions[port];
@@ -69,9 +72,6 @@ int do_event(evtchn_port_t port, struct pt_regs *regs)
/* call the handler */
action->handler(port, regs, action->data);
- out:
- clear_evtchn(port);
-
return 1;
}