Explorar o código

[ARM] Only call set_type method in setup_irq if it's defined

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King %!s(int64=19) %!d(string=hai) anos
pai
achega
16ed926eee
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      arch/arm/kernel/irq.c

+ 2 - 1
arch/arm/kernel/irq.c

@@ -710,7 +710,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 		desc->pending = 0;
 		desc->disable_depth = 1;
 
-		if (new->flags & SA_TRIGGER_MASK) {
+		if (new->flags & SA_TRIGGER_MASK &&
+		    desc->chip->set_type) {
 			unsigned int type = new->flags & SA_TRIGGER_MASK;
 			desc->chip->set_type(irq, type);
 		}