From patchwork Fri Oct 9 03:05:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "yebin (H)" X-Patchwork-Id: 11824887 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B57CA139F for ; Fri, 9 Oct 2020 02:54:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A55D422254 for ; Fri, 9 Oct 2020 02:54:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731012AbgJICyn (ORCPT ); Thu, 8 Oct 2020 22:54:43 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14805 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729308AbgJICyn (ORCPT ); Thu, 8 Oct 2020 22:54:43 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 19A08A205533E1D9086A; Fri, 9 Oct 2020 10:54:40 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 9 Oct 2020 10:54:29 +0800 From: Ye Bin To: , , , CC: Ye Bin Subject: [PATCH] scsi: qla2xxx: Fix uninitialized variable reference in qla_nvme_post_cmd Date: Fri, 9 Oct 2020 11:05:16 +0800 Message-ID: <20201009030516.123801-1-yebin10@huawei.com> X-Mailer: git-send-email 2.16.2.dirty MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 --- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)