From: Paul Mundt Date: Tue, 7 Aug 2007 09:51:19 +0000 (+0900) Subject: sh: intc: Fix sense regs oops for IRL IRQs. X-Git-Tag: firefly_0821_release~25993^2~104 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d64d4256cccd3a452ebd8c37a1d41e2d5dab8c6;p=firefly-linux-kernel-4.4.55.git sh: intc: Fix sense regs oops for IRL IRQs. 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 --- diff --git a/arch/sh/kernel/cpu/irq/intc.c b/arch/sh/kernel/cpu/irq/intc.c index a25f70dd6ad7..56819409a36a 100644 --- a/arch/sh/kernel/cpu/irq/intc.c +++ b/arch/sh/kernel/cpu/irq/intc.c @@ -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);