scsi: qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res'
authorBart Van Assche <bvanassche@acm.org>
Thu, 18 Oct 2018 22:45:45 +0000 (15:45 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Oct 2018 01:32:34 +0000 (21:32 -0400)
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>
drivers/scsi/qla2xxx/qla_mr.c

index 2d96f3b7e3e364d29764bbadedb1ffb2b6da59e0..b8f967e6189153442a5923e0d00830f1d8b6031a 100644 (file)
@@ -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;