From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 8 Mar 2007 04:41:13 +0000 (-0800) Subject: [PATCH] uml: activate_fd: return ENOMEM only when appropriate X-Git-Tag: v2.6.21-rc4~91 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0f97869df672f7f05ce3e8672ca42792d6df852b;p=linux-2.6-omap-h63xx.git [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 Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 50a288bb875..dbf2f5bc842 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) .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)) {