diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2007-03-07 23:41:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-08 10:38:21 -0500 |
commit | 0f97869df672f7f05ce3e8672ca42792d6df852b (patch) | |
tree | d2db16212dd03af20ba1b25fd5fa1c4e6fb3d7fd /arch/um | |
parent | ec0ac8ad33189f81324948ee5dc72d3e1dc64682 (diff) |
[PATCH] uml: activate_fd: return ENOMEM only when appropriate
Avoid returning ENOMEM in case of a duplicate IRQ - ENOMEM was saved into err
earlier.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/irq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 50a288bb875a..dbf2f5bc842f 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -142,6 +142,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
142 | .events = events, | 142 | .events = events, |
143 | .current_events = 0 } ); | 143 | .current_events = 0 } ); |
144 | 144 | ||
145 | err = -EBUSY; | ||
145 | spin_lock_irqsave(&irq_lock, flags); | 146 | spin_lock_irqsave(&irq_lock, flags); |
146 | for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) { | 147 | for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) { |
147 | if ((irq_fd->fd == fd) && (irq_fd->type == type)) { | 148 | if ((irq_fd->fd == fd) && (irq_fd->type == type)) { |