diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-10-08 19:32:39 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-10-08 16:50:40 -0400 |
commit | 1ef16a407f544408d3559e4de2ed05591df4da75 (patch) | |
tree | 0804769e5506b1eb3c0a2ba5a17bd9d89b375adc /drivers | |
parent | b6ba9b0e201a1c36972143366a3c22e672c43a61 (diff) | |
download | linux-1ef16a407f544408d3559e4de2ed05591df4da75.tar.bz2 |
scsi: qla2xxx: Fix return of uninitialized value in rval
A previous change removed the initialization of rval and there is now an
error where an uninitialized rval is being returned on an error return
path. Fix this by returning -ENODEV.
Link: https://lore.kernel.org/r/20201008183239.200358-1-colin.king@canonical.com
Fixes: b994718760fa ("scsi: qla2xxx: Use constant when it is known")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Acked-by: Pavel Machek (CIP) <pavel@denx.de>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Uninitialized scalar variable")
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nvme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index ccec660b13d4..2cd9bd288910 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -562,7 +562,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) |