Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fcbe8090a001522f98ad6f3146f0a1d9fa473821
Commit:     fcbe8090a001522f98ad6f3146f0a1d9fa473821
Parent:     d9303d662fa3fca8a6d27dee82b961a5f5524f20
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 20 16:36:48 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 09:11:35 2007 +1000

    [POWERPC] Simplify error logic in rtas_setup_msi_irqs()
    
    rtas_setup_msi_irqs() doesn't need to call teardown() itself, the
    generic code will do this for us as long as we return a non-zero
    value.
    
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pseries/msi.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c 
b/arch/powerpc/platforms/pseries/msi.c
index 6063ea2..9c3bcfe 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)
 
        if (rc != nvec) {
                pr_debug("rtas_msi: rtas_change_msi() failed\n");
-
-               /*
-                * In case of an error it's not clear whether the device is
-                * left with MSI enabled or not, so we explicitly disable.
-                */
-               goto out_free;
+               return rc;
        }
 
        i = 0;
        list_for_each_entry(entry, &pdev->msi_list, list) {
                hwirq = rtas_query_irq_number(pdn, i);
                if (hwirq < 0) {
-                       rc = hwirq;
                        pr_debug("rtas_msi: error (%d) getting hwirq\n", rc);
-                       goto out_free;
+                       return hwirq;
                }
 
                virq = irq_create_mapping(NULL, hwirq);
 
                if (virq == NO_IRQ) {
                        pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);
-                       rc = -ENOSPC;
-                       goto out_free;
+                       return -ENOSPC;
                }
 
                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)
        }
 
        return 0;
-
- out_free:
-       rtas_teardown_msi_irqs(pdev);
-       return rc;
 }
 
 static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to