diff options
author | David Daney <david.daney@cavium.com> | 2017-08-18 02:53:33 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-08-18 11:21:42 +0200 |
commit | 0d12ec075a18f53e6f58ec95a4f534da2641bf9b (patch) | |
tree | b1a2abb17c20a253724ae65a62c1ee7017a4b3b3 /kernel/irq/irqdomain.c | |
parent | irqdomain: Factor out code to add and remove items to and from the revmap (diff) | |
download | linux-0d12ec075a18f53e6f58ec95a4f534da2641bf9b.tar.xz linux-0d12ec075a18f53e6f58ec95a4f534da2641bf9b.zip |
irqdomain: Check for NULL function pointer in irq_domain_free_irqs_hierarchy()
A follow-on patch will call irq_domain_free_irqs_hierarchy() when the
free() function pointer may be NULL.
Add a NULL pointer check to handle this new use case.
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Link: http://lkml.kernel.org/r/1503017616-3252-5-git-send-email-david.daney@cavium.com
Diffstat (limited to '')
-rw-r--r-- | kernel/irq/irqdomain.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 2093b88ce9b7..24fda7557cef 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1362,7 +1362,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain, unsigned int irq_base, unsigned int nr_irqs) { - domain->ops->free(domain, irq_base, nr_irqs); + if (domain->ops->free) + domain->ops->free(domain, irq_base, nr_irqs); } int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain, |