lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200802111530.5020-1-tianjia.zhang@linux.alibaba.com>
Date:   Sun,  2 Aug 2020 19:15:30 +0800
From:   Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To:     njavali@...vell.com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, quinn.tran@...ium.com,
        himanshu.madhani@...ium.com
Cc:     GR-QLogic-Storage-Upstream@...vell.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, tianjia.zhang@...baba.com
Subject: [PATCH] scsi: qla2xxx: Fix wrong return value in qla_nvme_register_hba()

On an error exit path, a negative error code should be returned
instead of a positive return value.

Fixes: 8777e4314d397 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine")
Cc: Quinn Tran <quinn.tran@...ium.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
---
 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 fa695a4007f8..a8da6be52b18 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -678,7 +678,7 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha)
 	struct nvme_fc_port_template *tmpl;
 	struct qla_hw_data *ha;
 	struct nvme_fc_port_info pinfo;
-	int ret = EINVAL;
+	int ret = -EINVAL;
 
 	if (!IS_ENABLED(CONFIG_NVME_FC))
 		return ret;
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ