aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/of/irq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index a3c1c5aae6a9..5c645c7227b8 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -482,8 +482,9 @@ void __init of_irq_init(const struct of_device_id *matches)
482 } 482 }
483 483
484 /* Get the next pending parent that might have children */ 484 /* Get the next pending parent that might have children */
485 desc = list_first_entry(&intc_parent_list, typeof(*desc), list); 485 desc = list_first_entry_or_null(&intc_parent_list,
486 if (list_empty(&intc_parent_list) || !desc) { 486 typeof(*desc), list);
487 if (!desc) {
487 pr_err("of_irq_init: children remain, but no parents\n"); 488 pr_err("of_irq_init: children remain, but no parents\n");
488 break; 489 break;
489 } 490 }