aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/msi.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 6063ea2f67ad..9c3bcfe3fe6a 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -189,29 +189,22 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
189 189
190 if (rc != nvec) { 190 if (rc != nvec) {
191 pr_debug("rtas_msi: rtas_change_msi() failed\n"); 191 pr_debug("rtas_msi: rtas_change_msi() failed\n");
192 192 return rc;
193 /*
194 * In case of an error it's not clear whether the device is
195 * left with MSI enabled or not, so we explicitly disable.
196 */
197 goto out_free;
198 } 193 }
199 194
200 i = 0; 195 i = 0;
201 list_for_each_entry(entry, &pdev->msi_list, list) { 196 list_for_each_entry(entry, &pdev->msi_list, list) {
202 hwirq = rtas_query_irq_number(pdn, i); 197 hwirq = rtas_query_irq_number(pdn, i);
203 if (hwirq < 0) { 198 if (hwirq < 0) {
204 rc = hwirq;
205 pr_debug("rtas_msi: error (%d) getting hwirq\n", rc); 199 pr_debug("rtas_msi: error (%d) getting hwirq\n", rc);
206 goto out_free; 200 return hwirq;
207 } 201 }
208 202
209 virq = irq_create_mapping(NULL, hwirq); 203 virq = irq_create_mapping(NULL, hwirq);
210 204
211 if (virq == NO_IRQ) { 205 if (virq == NO_IRQ) {
212 pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq); 206 pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);
213 rc = -ENOSPC; 207 return -ENOSPC;
214 goto out_free;
215 } 208 }
216 209
217 dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq); 210 dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq);
@@ -220,10 +213,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
220 } 213 }
221 214
222 return 0; 215 return 0;
223
224 out_free:
225 rtas_teardown_msi_irqs(pdev);
226 return rc;
227} 216}
228 217
229static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev) 218static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev)