Skip to content

Commit 1ef16a4

Browse files
Colin Ian Kingmartinkpetersen
authored andcommitted
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: b994718 ("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")
1 parent b6ba9b0 commit 1ef16a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/qla2xxx/qla_nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
562562
vha = fcport->vha;
563563

564564
if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
565-
return rval;
565+
return -ENODEV;
566566

567567
if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
568568
(qpair && !qpair->fw_started) || fcport->deleted)

0 commit comments

Comments
 (0)