diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 0f2dfb0aaa6a..f95d10ba3b9c 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -725,6 +725,10 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
725 | struct resource res; | 725 | struct resource res; |
726 | u32 temp = 0, ret; | 726 | u32 temp = 0, ret; |
727 | 727 | ||
728 | ret = of_address_to_resource(node, 0, &res); | ||
729 | if (ret) | ||
730 | return NULL; | ||
731 | |||
728 | ipic = alloc_bootmem(sizeof(struct ipic)); | 732 | ipic = alloc_bootmem(sizeof(struct ipic)); |
729 | if (ipic == NULL) | 733 | if (ipic == NULL) |
730 | return NULL; | 734 | return NULL; |
@@ -739,12 +743,6 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
739 | return NULL; | 743 | return NULL; |
740 | } | 744 | } |
741 | 745 | ||
742 | ret = of_address_to_resource(node, 0, &res); | ||
743 | if (ret) { | ||
744 | of_node_put(node); | ||
745 | return NULL; | ||
746 | } | ||
747 | |||
748 | ipic->regs = ioremap(res.start, res.end - res.start + 1); | 746 | ipic->regs = ioremap(res.start, res.end - res.start + 1); |
749 | 747 | ||
750 | ipic->irqhost->host_data = ipic; | 748 | ipic->irqhost->host_data = ipic; |