瀏覽代碼

Char: cyclades, allow DEBUG_SHIRQ

Test if base addr is non-null in ISR to prove the card has been correctly
initialized.  This is needed for DEBUG_SHIRQ for example.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby 18 年之前
父節點
當前提交
f1e83c6c1e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/char/cyclades.c

+ 4 - 0
drivers/char/cyclades.c

@@ -1444,6 +1444,10 @@ static irqreturn_t cyy_interrupt(int irq, void *dev_id)
 	card_base_addr = cinfo->base_addr;
 	card_base_addr = cinfo->base_addr;
 	index = cinfo->bus_index;
 	index = cinfo->bus_index;
 
 
+	/* card was not initialized yet (e.g. DEBUG_SHIRQ) */
+	if (unlikely(card_base_addr == NULL))
+		return IRQ_HANDLED;
+
 	/* This loop checks all chips in the card.  Make a note whenever
 	/* This loop checks all chips in the card.  Make a note whenever
 	   _any_ chip had some work to do, as this is considered an
 	   _any_ chip had some work to do, as this is considered an
 	   indication that there will be more to do.  Only when no chip
 	   indication that there will be more to do.  Only when no chip