patch-2.4.0-test10 linux/drivers/scsi/sim710.c
Next file: linux/drivers/scsi/sr.c
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Mon Oct 30 14:44:29 2000
- Orig file:
v2.4.0-test9/linux/drivers/scsi/sim710.c
- Orig date:
Sun Oct 8 10:50:25 2000
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/scsi/sim710.c linux/drivers/scsi/sim710.c
@@ -1448,10 +1448,16 @@
tpnt->proc_name = "sim710";
for(indx = 0; indx < no_of_boards; indx++) {
+ unsigned long page = __get_free_pages(GFP_ATOMIC, order);
+ if(page == NULL)
+ {
+ printk(KERN_WARNING "sim710: out of memory registering board %d.\n", indx);
+ break;
+ }
host = scsi_register(tpnt, 4);
- host->hostdata[0] = __get_free_pages(GFP_ATOMIC, order);
- if (host->hostdata[0] == 0)
- panic ("sim710: Couldn't get hostdata memory");
+ if(host == NULL)
+ break;
+ host->hostdata[0] = page;
hostdata = (struct sim710_hostdata *)host->hostdata[0];
memset(hostdata, 0, size);
#ifdef CONFIG_TP34V_SCSI
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)