Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57d75561be5496289601b2c94787ec38c718fcae
Commit:     57d75561be5496289601b2c94787ec38c718fcae
Parent:     d1dfc35d3a62122b85ca975b80dcbf4a0da0bebc
Author:     Roel Kluin <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 28 00:22:13 2007 +1000
Committer:  Josh Boyer <[EMAIL PROTECTED]>
CommitDate: Thu Nov 1 07:14:09 2007 -0500

    [POWERPC] allocation fix in ppc/platforms/4xx/luan.c
    
    Don't allocate hose2 when when hose1 can't be allocated and free hose1 when
    hose2 can't be allocated.
    
    Signed-off-by: Roel Kluin <[EMAIL PROTECTED]>
    Signed-off-by: Josh Boyer <[EMAIL PROTECTED]>
---
 arch/ppc/platforms/4xx/luan.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 4b16961..b79ebb8 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -230,9 +230,14 @@ luan_setup_hoses(void)
 
        /* Allocate hoses for PCIX1 and PCIX2 */
        hose1 = pcibios_alloc_controller();
+       if (!hose1)
+               return;
+
        hose2 = pcibios_alloc_controller();
-       if (!hose1 || !hose2)
+       if (!hose2) {
+               pcibios_free_controller(hose1);
                return;
+       }
 
        /* Setup PCIX1 */
        hose1->first_busno = 0;
-
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