linux-mips
[Top] [All Lists]

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

To: linux-mips@oss.sgi.com
Subject: [PATCH] clean error in arch/mips/pmc/cp7000/irq.c:request_irq
From: Florian Lohoff <flo@rfc822.org>
Date: Tue, 30 Jan 2001 00:52:50 +0100
Organization: rfc822 - pure communication
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
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?


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] clean error in arch/mips/pmc/cp7000/irq.c:request_irq, Florian Lohoff <=