sh: intc: Fix sense regs oops for IRL IRQs.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 7 Aug 2007 09:51:19 +0000 (18:51 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 21 Sep 2007 02:57:48 +0000 (11:57 +0900)
IRL doesn't always define sense registers, so don't bother trying to
iterate through the table. This ended up causing an oops on SH-X3
when using IRL mode.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/irq/intc.c

index a25f70dd6ad7d15aed18ed8f338ae9b83370c1e4..56819409a36a15eef421999f7ee9a98b132f845c 100644 (file)
@@ -218,7 +218,7 @@ static int intc_set_sense(unsigned int irq, unsigned int type)
                break;
        }
 
-       if (!enum_id || !value)
+       if (!enum_id || !value || !desc->sense_regs)
                return -EINVAL;
 
        value ^= VALID(0);