patch-2.4.8 linux/drivers/scsi/gdth_proc.c

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

diff -u --recursive --new-file v2.4.7/linux/drivers/scsi/gdth_proc.c linux/drivers/scsi/gdth_proc.c
@@ -47,6 +47,8 @@
 #if LINUX_VERSION_CODE >= 0x020322
     sdev = scsi_get_host_dev(gdth_ctr_vtab[vh]);
     scp  = scsi_allocate_device(sdev, 1, FALSE);
+    if (!scp)
+	    return -ENOMEM;
     scp->cmd_len = 12;
     scp->use_sg = 0;
 #else

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