Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e92e63aa authored by Boaz Harrosh's avatar Boaz Harrosh Committed by James Bottomley
Browse files

[SCSI] isd200: Allocate sense_buffer for hacked up scsi_cmnd



Since the separation of sense_buffer from scsi_cmnd, Drivers that hack their
own struct scsi_cmnd like here isd200, must also take care of their own
sense_buffer.

Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 4b6f5b3a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1469,6 +1469,7 @@ static void isd200_free_info_ptrs(void *info_)
	if (info) {
		kfree(info->id);
		kfree(info->RegsBuf);
		kfree(info->srb.sense_buffer);
	}
}

@@ -1494,7 +1495,9 @@ static int isd200_init_info(struct us_data *us)
				kzalloc(sizeof(struct hd_driveid), GFP_KERNEL);
		info->RegsBuf = (unsigned char *)
				kmalloc(sizeof(info->ATARegs), GFP_KERNEL);
		if (!info->id || !info->RegsBuf) {
		info->srb.sense_buffer =
				kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
		if (!info->id || !info->RegsBuf || !info->srb.sense_buffer) {
			isd200_free_info_ptrs(info);
			kfree(info);
			retStatus = ISD200_ERROR;