]> git.baikalelectronics.ru Git - kernel.git/commit
irqdomain: Fix irq_domain_alloc_irqs_recursive() error handling
authorAlexander Popov <alex.popov@linux.com>
Sun, 3 Jul 2016 00:24:08 +0000 (03:24 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 11 Jul 2016 15:23:48 +0000 (17:23 +0200)
commit60c6acca31d6448c2963c3e10d360c0f0849f9f2
treefbbcc4251eba55cb250e31acca7e87282fb9580b
parentb2dbd5e0e9d08967e184c4647c3f46aedd77950c
irqdomain: Fix irq_domain_alloc_irqs_recursive() error handling

If an irq_domain is auto-recursive and irq_domain_alloc_irqs_recursive()
for its parent has returned an error, then do return and avoid calling
irq_domain_free_irqs_recursive() uselessly, because:
- if domain->ops->alloc() had failed for an auto-recursive irq_domain,
   then irq_domain_free_irqs_recursive() had already been called;
- if domain->ops->alloc() had failed for a not auto-recursive irq_domain,
   then there is nothing to free at all.

Signed-off-by: Alexander Popov <alex.popov@linux.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1467505448-2850-1-git-send-email-alex.popov@linux.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/irqdomain.c