]> Pileus Git - ~andy/linux/commitdiff
[SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands
authorSarang Radke <sarang.radke@qlogic.com>
Thu, 18 Feb 2010 18:07:23 +0000 (10:07 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 19 Feb 2010 16:44:40 +0000 (10:44 -0600)
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: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_attr.c

index 5a19aea17022acefd315368827fc120856577c7a..cbce52eb9b94396c2d94be5d2a794baab5814036 100644 (file)
@@ -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);