From: Pat Gefre hcl.c clean up for init failures and OOM --- 25-akpm/arch/ia64/sn/io/hwgfs/hcl.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff -puN arch/ia64/sn/io/hwgfs/hcl.c~sn28 arch/ia64/sn/io/hwgfs/hcl.c --- 25/arch/ia64/sn/io/hwgfs/hcl.c~sn28 Thu Jan 8 15:20:14 2004 +++ 25-akpm/arch/ia64/sn/io/hwgfs/hcl.c Thu Jan 8 15:21:34 2004 @@ -82,8 +82,10 @@ int __init init_hcl(void) * Create the hwgraph_root. */ rv = hwgraph_path_add(NULL, EDGE_LBL_HW, &hwgraph_root); - if (rv) - printk ("WARNING: init_hcl: Failed to create hwgraph_root. Error = %d.\n", rv); + if (rv) { + printk("init_hcl: Failed to create hwgraph_root.\n"); + return -1; + } /* * Initialize the HCL string table. @@ -96,8 +98,8 @@ int __init init_hcl(void) */ rv = hwgraph_path_add(hwgraph_root, EDGE_LBL_LINUX_BUS, &linux_busnum); if (linux_busnum == NULL) { - panic("HCL: Unable to create %s\n", EDGE_LBL_LINUX_BUS); - return(0); + printk("HCL: Unable to create %s\n", EDGE_LBL_LINUX_BUS); + return -1; } pci_bus_cvlink_init(); @@ -108,8 +110,7 @@ int __init init_hcl(void) */ init_ioconfig_bus(); - return(0); - + return 0; } _