소스 검색

[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 19 년 전
부모
커밋
16ed926eee
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);
 		}