Subject: [PATCH] clean error in arch/mips/pmc/cp7000/irq.c:request_irq

From: Florian Lohoff <[email-masked]>
Date: Tue, 30 Jan 2001 00:52:50 +0100

Hi,
i think this is more correct - On failing of shared irqs one should
at least reenable interrupts and free the allocated buffer.

Apply before anyone copys this into his/her code ...

Index: arch/mips/pmc/cp7000/irq.c
===================================================================
RCS file: /cvs/linux/arch/mips/pmc/cp7000/irq.c,v
retrieving revision 1.1
diff -u -r1.1 irq.c
--- arch/mips/pmc/cp7000/irq.c	2000/12/13 21:07:34	1.1
+++ arch/mips/pmc/cp7000/irq.c	2001/01/29 23:50:34
@@ -327,8 +327,11 @@
 
 	if ((old = *p) != NULL) {
 		/* Can't share interrupts unless both agree to */
-		if (!(old->flags & action->flags & SA_SHIRQ))
+		if (!(old->flags & action->flags & SA_SHIRQ)) {
+			restore_flags(flags);
+			kfree(action);
 			return -EBUSY;
+		}
 		/* add new interrupt at end of irq queue */
 		do {
 			p = &old->next;

-- 
Florian Lohoff                  [email-masked]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?