From ca4d6f2a898b2534241568475be8cfe932ff3e29 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Sun, 28 Oct 2007 00:22:13 +1000 Subject: [PATCH] --- yaml --- r: 73336 b: refs/heads/master c: 57d75561be5496289601b2c94787ec38c718fcae h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/ppc/platforms/4xx/luan.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 7703f969d436..ccadad8ccad7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1dfc35d3a62122b85ca975b80dcbf4a0da0bebc +refs/heads/master: 57d75561be5496289601b2c94787ec38c718fcae diff --git a/trunk/arch/ppc/platforms/4xx/luan.c b/trunk/arch/ppc/platforms/4xx/luan.c index 4b169610f154..b79ebb8a3e6c 100644 --- a/trunk/arch/ppc/platforms/4xx/luan.c +++ b/trunk/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;