Skip to content

Commit

Permalink
sh: intc: Fix sense regs oops for IRL IRQs.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 21, 2007
1 parent 96290d8 commit 6d64d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/irq/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6d64d42

Please sign in to comment.