summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2018-10-18 15:45:45 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2018-10-23 21:32:34 -0400
commit5b0af4777b1bf397787f03336f0db34f185ca565 (patch)
tree82daff70aa2809d74e26e2d1b1b7f3f0a3e8e690 /drivers/scsi
parenteb023220f4eac1703e22e48ed62310a6565b3a1f (diff)
downloadlinux-stable-5b0af4777b1bf397787f03336f0db34f185ca565.tar.gz
linux-stable-5b0af4777b1bf397787f03336f0db34f185ca565.tar.bz2
linux-stable-5b0af4777b1bf397787f03336f0db34f185ca565.zip
scsi: qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res'
Only one of the two code paths in qlafx00_ioctl_iosb_entry() initializes the variable 'res'. Make sure that 'res' is initialized before sp->done(sp, res) is called. Cc: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_mr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index 2d96f3b7e3e3..b8f967e61891 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -2212,7 +2212,7 @@ qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct bsg_job *bsg_job;
struct fc_bsg_reply *bsg_reply;
struct srb_iocb *iocb_job;
- int res;
+ int res = 0;
struct qla_mt_iocb_rsp_fx00 fstatus;
uint8_t *fw_sts_ptr;