patch-2.4.2 linux/drivers/scsi/scsi_ioctl.c
Next file: linux/drivers/scsi/scsi_lib.c
Previous file: linux/drivers/scsi/scsi_error.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Sun Feb 4 10:05:30 2001
- Orig file:
v2.4.1/linux/drivers/scsi/scsi_ioctl.c
- Orig date:
Thu Nov 16 12:51:28 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -101,7 +101,10 @@
SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", cmd[0]));
- SRpnt = scsi_allocate_request(dev);
+ if (NULL == (SRpnt = scsi_allocate_request(dev))) {
+ printk("SCSI internal ioctl failed, no memory\n");
+ return -ENOMEM;
+ }
SRpnt->sr_data_direction = SCSI_DATA_NONE;
scsi_wait_req(SRpnt, cmd, NULL, 0, timeout, retries);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)