summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorSarang Radke <sarang.radke@qlogic.com>2010-02-18 19:07:23 +0100
committerJames Bottomley <James.Bottomley@suse.de>2010-02-19 17:44:40 +0100
commit236b0249c2274cd24bc98a1fbbb5e78d861d4bd9 (patch)
tree76e41cd7d7b5d6792b60ea69d0443260031fe0e7 /drivers/scsi
parent[SCSI] fix duplicate removal on error path in scsi_sysfs_add_sdev (diff)
downloadlinux-236b0249c2274cd24bc98a1fbbb5e78d861d4bd9.tar.xz
linux-236b0249c2274cd24bc98a1fbbb5e78d861d4bd9.zip
[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: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 5a19aea17022..cbce52eb9b94 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -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);