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: <20200802111531.5065-1-tianjia.zhang@linux.alibaba.com>
Date:   Sun,  2 Aug 2020 19:15:31 +0800
From:   Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To:     jejb@...ux.ibm.com, martin.petersen@...cle.com,
        tianjia.zhang@...ux.alibaba.com, arkadiusz@...bczyk.org,
        praveenm@...lsio.com, davem@...emloft.net
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        tianjia.zhang@...baba.com
Subject: [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()

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

Fixes: f40e74ffa3de4 ("csiostor:firmware upgrade fix")
Cc: Praveen Madhavan <praveenm@...lsio.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
---
 drivers/scsi/csiostor/csio_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 950f9cdf0577..5d0f42031d12 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2384,7 +2384,7 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,
 			FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c),
 			FW_HDR_FW_VER_MAJOR_G(k), FW_HDR_FW_VER_MINOR_G(k),
 			FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k));
-		ret = EINVAL;
+		ret = -EINVAL;
 		goto bye;
 	}
 
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ