diff options
Diffstat (limited to 'drivers/of/irq.c')
-rw-r--r-- | drivers/of/irq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index a3c1c5aae6a9..1264923ade0f 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -345,6 +345,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r) | |||
345 | if (r && irq) { | 345 | if (r && irq) { |
346 | const char *name = NULL; | 346 | const char *name = NULL; |
347 | 347 | ||
348 | memset(r, 0, sizeof(*r)); | ||
348 | /* | 349 | /* |
349 | * Get optional "interrupts-names" property to add a name | 350 | * Get optional "interrupts-names" property to add a name |
350 | * to the resource. | 351 | * to the resource. |
@@ -482,8 +483,9 @@ void __init of_irq_init(const struct of_device_id *matches) | |||
482 | } | 483 | } |
483 | 484 | ||
484 | /* Get the next pending parent that might have children */ | 485 | /* Get the next pending parent that might have children */ |
485 | desc = list_first_entry(&intc_parent_list, typeof(*desc), list); | 486 | desc = list_first_entry_or_null(&intc_parent_list, |
486 | if (list_empty(&intc_parent_list) || !desc) { | 487 | typeof(*desc), list); |
488 | if (!desc) { | ||
487 | pr_err("of_irq_init: children remain, but no parents\n"); | 489 | pr_err("of_irq_init: children remain, but no parents\n"); |
488 | break; | 490 | break; |
489 | } | 491 | } |