patch-2.4.2 linux/drivers/scsi/scsi_scan.c

Next file: linux/drivers/scsi/scsi_syms.c
Previous file: linux/drivers/scsi/scsi_queue.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/scsi/scsi_scan.c linux/drivers/scsi/scsi_scan.c
@@ -492,7 +492,10 @@
 	SDpnt->expecting_cc_ua = 0;
 	SDpnt->starved = 0;
 
-	SRpnt = scsi_allocate_request(SDpnt);
+	if (NULL == (SRpnt = scsi_allocate_request(SDpnt))) {
+		printk("scan_scsis_single: no memory\n");
+		return 0;
+	}
 
 	/*
 	 * We used to do a TEST_UNIT_READY before the INQUIRY but that was 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)