diff options
-rw-r--r-- | kernel/irq/irqdomain.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 3601f3fbf67c..9310a8d365b0 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -350,7 +350,8 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain) | |||
350 | unsigned int irq_create_mapping(struct irq_domain *domain, | 350 | unsigned int irq_create_mapping(struct irq_domain *domain, |
351 | irq_hw_number_t hwirq) | 351 | irq_hw_number_t hwirq) |
352 | { | 352 | { |
353 | unsigned int virq, hint; | 353 | unsigned int hint; |
354 | int virq; | ||
354 | 355 | ||
355 | pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq); | 356 | pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq); |
356 | 357 | ||
@@ -381,9 +382,9 @@ unsigned int irq_create_mapping(struct irq_domain *domain, | |||
381 | if (hint == 0) | 382 | if (hint == 0) |
382 | hint++; | 383 | hint++; |
383 | virq = irq_alloc_desc_from(hint, 0); | 384 | virq = irq_alloc_desc_from(hint, 0); |
384 | if (!virq) | 385 | if (virq <= 0) |
385 | virq = irq_alloc_desc_from(1, 0); | 386 | virq = irq_alloc_desc_from(1, 0); |
386 | if (!virq) { | 387 | if (virq <= 0) { |
387 | pr_debug("irq: -> virq allocation failed\n"); | 388 | pr_debug("irq: -> virq allocation failed\n"); |
388 | return 0; | 389 | return 0; |
389 | } | 390 | } |