Thread (56 messages) flat view 56 messages, 11 authors, 2011-09-20
STALE5478d

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 current
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]

[PATCH 2/5] irq: fix existing domain check in irq_domain_add

From: Rob Herring <hidden>
Date: 2011-09-14 16:31:58
Also in: linux-devicetree, lkml
Subsystem: irq domains (irq number mapping library), irq subsystem, the rest · Maintainers: Thomas Gleixner, Linus Torvalds

From: Rob Herring <redacted>

irq_data will normally exist, so the domain was prevented from being set.
The simple domain code did not hit this as nr_irq is always 0.

Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
Cc: Thomas Gleixner <redacted>
---
 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 d5828da..84f4110 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -29,7 +29,7 @@ void irq_domain_add(struct irq_domain *domain)
 	 */
 	for (hwirq = 0; hwirq < domain->nr_irq; hwirq++) {
 		d = irq_get_irq_data(irq_domain_to_irq(domain, hwirq));
-		if (d || d->domain) {
+		if (d && d->domain) {
 			/* things are broken; just report, don't clean up */
 			WARN(1, "error: irq_desc already assigned to a domain");
 			return;
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help