patch-2.4.8 linux/drivers/scsi/sd.c
Next file: linux/drivers/scsi/ultrastor.c
Previous file: linux/drivers/scsi/scsi_lib.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Sun Aug 5 13:12:41 2001
- Orig file:
v2.4.7/linux/drivers/scsi/sd.c
- Orig date:
Wed Jul 25 17:10:23 2001
diff -u --recursive --new-file v2.4.7/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -762,8 +762,17 @@
*/
SRpnt = scsi_allocate_request(rscsi_disks[i].device);
+ if (!SRpnt) {
+ printk(KERN_WARNING "(sd_init_onedisk:) Request allocation failure.\n");
+ return i;
+ }
buffer = (unsigned char *) scsi_malloc(512);
+ if (!buffer) {
+ printk(KERN_WARNING "(sd_init_onedisk:) Memory allocation failure.\n");
+ scsi_release_request(SRpnt);
+ return i;
+ }
spintime = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)