aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic_u3msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic_u3msi.c')
-rw-r--r--arch/powerpc/sysdev/mpic_u3msi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 1d5a40899b74..6e2f8686fdfc 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -115,17 +115,19 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
115 struct msi_desc *entry; 115 struct msi_desc *entry;
116 struct msi_msg msg; 116 struct msi_msg msg;
117 u64 addr; 117 u64 addr;
118 int ret;
118 119
119 addr = find_ht_magic_addr(pdev); 120 addr = find_ht_magic_addr(pdev);
120 msg.address_lo = addr & 0xFFFFFFFF; 121 msg.address_lo = addr & 0xFFFFFFFF;
121 msg.address_hi = addr >> 32; 122 msg.address_hi = addr >> 32;
122 123
123 list_for_each_entry(entry, &pdev->msi_list, list) { 124 list_for_each_entry(entry, &pdev->msi_list, list) {
124 hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1); 125 ret = mpic_msi_alloc_hwirqs(msi_mpic, 1);
125 if (hwirq < 0) { 126 if (ret < 0) {
126 pr_debug("u3msi: failed allocating hwirq\n"); 127 pr_debug("u3msi: failed allocating hwirq\n");
127 return hwirq; 128 return ret;
128 } 129 }
130 hwirq = ret;
129 131
130 virq = irq_create_mapping(msi_mpic->irqhost, hwirq); 132 virq = irq_create_mapping(msi_mpic->irqhost, hwirq);
131 if (virq == NO_IRQ) { 133 if (virq == NO_IRQ) {