* [PATCH] irq: Fix possible null pointer dereference on domains with no ops
@ 2011-11-23 12:13 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2011-11-23 12:13 UTC (permalink / raw)
To: Thomas Gleixner, Jamie Iles; +Cc: linux-kernel, patches, Mark Brown
It is optional for irqdomains to have operations so we need to check for
their presence before dereferencing them when looking for dt_translate().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
kernel/irq/irqdomain.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 200ce83..b22a641 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -89,7 +89,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
/* Find a domain which can translate the irq spec */
mutex_lock(&irq_domain_mutex);
list_for_each_entry(domain, &irq_domain_list, list) {
- if (!domain->ops->dt_translate)
+ if (!domain->ops || !domain->ops->dt_translate)
continue;
rc = domain->ops->dt_translate(domain, controller,
intspec, intsize, &hwirq, &type);
--
1.7.7.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-23 12:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 12:13 [PATCH] irq: Fix possible null pointer dereference on domains with no ops Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).