mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
[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 <12o3l@tiscali.nl> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
This commit is contained in:
parent
d1dfc35d3a
commit
57d75561be
@ -230,10 +230,15 @@ luan_setup_hoses(void)
|
||||
|
||||
/* Allocate hoses for PCIX1 and PCIX2 */
|
||||
hose1 = pcibios_alloc_controller();
|
||||
hose2 = pcibios_alloc_controller();
|
||||
if (!hose1 || !hose2)
|
||||
if (!hose1)
|
||||
return;
|
||||
|
||||
hose2 = pcibios_alloc_controller();
|
||||
if (!hose2) {
|
||||
pcibios_free_controller(hose1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Setup PCIX1 */
|
||||
hose1->first_busno = 0;
|
||||
hose1->last_busno = 0xff;
|
||||
|
Loading…
Reference in New Issue
Block a user