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

Commit 236b0249 authored by Sarang Radke's avatar Sarang Radke Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands



Since bsg_job->reply->reply_payload_rcv_len is uninitialized
in case of failure, fc-transport triggers a warning for each command
failed.

Cc: stable@kernel.org
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent ee37e09d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2284,6 +2284,7 @@ qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
			"scsi(%ld) Vendor request %s failed\n", vha->host_no, type));
		rval = 0;
		bsg_job->reply->result = (DID_ERROR << 16);
		bsg_job->reply->reply_payload_rcv_len = 0;
		fw_sts_ptr = ((uint8_t*)bsg_job->req->sense) + sizeof(struct fc_bsg_reply);
		memcpy( fw_sts_ptr, response, sizeof(response));
		fw_sts_ptr += sizeof(response);