All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irq: fix crash due to op-less irq domains
@ 2011-12-14 20:55 Linus Walleij
  2011-12-14 22:14 ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2011-12-14 20:55 UTC (permalink / raw)
  To: linux-kernel, Rob Herring, Thomas Gleixner
  Cc: Linus Walleij, Rob Herring, Thomas Gleixner

From: Linus Walleij <linus.walleij@linaro.org>

IRQ domains without ops does not work anymore after commit
"irq: support domains with non-zero hwirq base", since the
check dereferences domain->ops->to_irq without checking of
domain->ops are NULL. This makes U300 (and probably most other
systems using the PL190 VIC) boot again.

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 include/linux/irqdomain.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 99834e58..78a1e66 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -74,7 +74,7 @@ struct irq_domain {
 static inline unsigned int irq_domain_to_irq(struct irq_domain *d,
 					     unsigned long hwirq)
 {
-	if (d->ops->to_irq)
+	if (d->ops && d->ops->to_irq)
 		return d->ops->to_irq(d, hwirq);
 	if (WARN_ON(hwirq < d->hwirq_base))
 		return 0;
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-15  7:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 20:55 [PATCH] irq: fix crash due to op-less irq domains Linus Walleij
2011-12-14 22:14 ` Rob Herring
2011-12-14 22:22   ` Jamie Iles
2011-12-14 22:26     ` Linus Walleij
2011-12-14 22:24   ` Linus Walleij
2011-12-15  7:03     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.