Message ID | 20201009030516.123801-1-yebin10@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1ef16a407f544408d3559e4de2ed05591df4da75 |
Headers | show |
Series | scsi: qla2xxx: Fix uninitialized variable reference in qla_nvme_post_cmd | expand |
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index ae47e0eb0311..1f9005125313 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -561,7 +561,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, vha = fcport->vha; if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED)) - return rval; + return -ENODEV; if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || (qpair && !qpair->fw_started) || fcport->deleted)
Fix follow warning: [drivers/scsi/qla2xxx/qla_nvme.c:564]: (error) Uninitialized variable: rval Fixes: b994718760fa ("scsi: qla2xxx: Use constant when it is known") Signed-off-by: Ye Bin <yebin10@huawei.com> --- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)