Skip to content

Commit 0d12ec0

Browse files
daviddaneyKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Linus Walleij <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected]
1 parent b526adf commit 0d12ec0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/irq/irqdomain.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain,
13621362
unsigned int irq_base,
13631363
unsigned int nr_irqs)
13641364
{
1365-
domain->ops->free(domain, irq_base, nr_irqs);
1365+
if (domain->ops->free)
1366+
domain->ops->free(domain, irq_base, nr_irqs);
13661367
}
13671368

13681369
int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,

0 commit comments

Comments
 (0)