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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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                  flo@rfc822.org             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux