Skip to content

Commit

Permalink
[PATCH] uml: activate_fd: return ENOMEM only when appropriate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Mar 8, 2007
1 parent ec0ac8a commit 0f97869
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/um/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
.events = events,
.current_events = 0 } );

err = -EBUSY;
spin_lock_irqsave(&irq_lock, flags);
for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) {
if ((irq_fd->fd == fd) && (irq_fd->type == type)) {
Expand Down

0 comments on commit 0f97869

Please sign in to comment.