patch-2.2.14 linux/drivers/scsi/sr_vendor.c
Next file: linux/drivers/scsi/sym53c416.h
Previous file: linux/drivers/scsi/sr_ioctl.c
Back to the patch index
Back to the overall index
-  Lines: 22
 -  Date:
Tue Jan  4 10:12:21 2000
 -  Orig file: 
v2.2.13/linux/drivers/scsi/sr_vendor.c
 -  Orig date: 
Mon May 10 13:01:21 1999
 
diff -u --recursive --new-file v2.2.13/linux/drivers/scsi/sr_vendor.c linux/drivers/scsi/sr_vendor.c
@@ -117,8 +117,8 @@
 		density = (blocklength > 2048) ? 0x81 : 0x83;
 #endif
 
-	buffer = (unsigned char *) scsi_malloc(512);
-	if (!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 
 #ifdef DEBUG
 	printk("sr%d: MODE SELECT 0x%x/%d\n",minor,density,blocklength);
@@ -160,8 +160,8 @@
 	if (scsi_CDs[minor].cdi.mask & CDC_MULTI_SESSION)
 		return 0;
 	
-	buffer = (unsigned char *) scsi_malloc(512);
-	if(!buffer) return -ENOMEM;
+	if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
+		return -ENOMEM;
 	
 	sector   = 0;         /* the multisession sector offset goes here  */
 	no_multi = 0;         /* flag: the drive can't handle multisession */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)