[PATCH 11/11] Char: cyclades, allow DEBUG_SHIRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

---
commit 71c2e9b72594f69e4e226006206ffa74b55c1642
tree 0134ea3532474f2c7bc2deabcf453b83f0747e5f
parent 73621a789a0482299242ea61c971af6b5f8b828a
author Jiri Slaby <[email protected]> Wed, 18 Apr 2007 11:59:22 +0200
committer Jiri Slaby <[email protected]> Wed, 18 Apr 2007 11:59:22 +0200

 drivers/char/cyclades.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 5a9e7d6..5d6559e 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1444,6 +1444,10 @@ static irqreturn_t cyy_interrupt(int irq, void *dev_id)
 	card_base_addr = cinfo->base_addr;
 	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
 	   _any_ chip had some work to do, as this is considered an
 	   indication that there will be more to do.  Only when no chip
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux