提交 57d75561 编写于 作者: R Roel Kluin 提交者: Josh Boyer

[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: NRoel Kluin <12o3l@tiscali.nl>
Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
上级 d1dfc35d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册