]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()
authorQianfeng Rong <rongqianfeng@vivo.com>
Fri, 5 Sep 2025 07:54:44 +0000 (15:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:34 +0000 (11:56 +0200)
commiteb4cb458fa61572f335dfb356feca2e8f68b3c88
treec7e6edd7bfa6eaabdc25783b0a9e0162511e3ac9
parent4284a328d96558c6d0fc3d7088dfd2e683788b3d
scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()

[ Upstream commit 1f037e3acda79639a78f096355f2c308a3d45492 ]

Change the error code EAGAIN to -EAGAIN in START_SP_W_RETRIES() to align
with qla2x00_start_sp() returning negative error codes or QLA_SUCCESS,
preventing logical errors.  Additionally, the '_rval' variable should
store negative error codes to conform to Linux kernel error code
conventions.

Fixes: 9803fb5d2759 ("scsi: qla2xxx: Fix task management cmd failure")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Message-ID: <20250905075446.381139-3-rongqianfeng@vivo.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla2xxx/qla_init.c