diff options
Diffstat (limited to 'arch/powerpc/sysdev/ipic.c')
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 0f2dfb0aaa6a..caba1c0be5a7 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -725,25 +725,21 @@ 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; |
731 | 735 | ||
732 | memset(ipic, 0, sizeof(struct ipic)); | 736 | memset(ipic, 0, sizeof(struct ipic)); |
733 | 737 | ||
734 | ipic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, | 738 | ipic->irqhost = irq_alloc_host(node, IRQ_HOST_MAP_LINEAR, |
735 | NR_IPIC_INTS, | 739 | NR_IPIC_INTS, |
736 | &ipic_host_ops, 0); | 740 | &ipic_host_ops, 0); |
737 | if (ipic->irqhost == NULL) { | 741 | if (ipic->irqhost == NULL) |
738 | of_node_put(node); | ||
739 | return NULL; | ||
740 | } | ||
741 | |||
742 | ret = of_address_to_resource(node, 0, &res); | ||
743 | if (ret) { | ||
744 | of_node_put(node); | ||
745 | return NULL; | 742 | return NULL; |
746 | } | ||
747 | 743 | ||
748 | ipic->regs = ioremap(res.start, res.end - res.start + 1); | 744 | ipic->regs = ioremap(res.start, res.end - res.start + 1); |
749 | 745 | ||