Skip to content

Commit 1f037e3

Browse files
qianfengrongmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()
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: 9803fb5 ("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>
1 parent 066b8f3 commit 1f037e3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,11 +2059,11 @@ static void qla_marker_sp_done(srb_t *sp, int res)
20592059
int cnt = 5; \
20602060
do { \
20612061
if (_chip_gen != sp->vha->hw->chip_reset || _login_gen != sp->fcport->login_gen) {\
2062-
_rval = EINVAL; \
2062+
_rval = -EINVAL; \
20632063
break; \
20642064
} \
20652065
_rval = qla2x00_start_sp(_sp); \
2066-
if (_rval == EAGAIN) \
2066+
if (_rval == -EAGAIN) \
20672067
msleep(1); \
20682068
else \
20692069
break; \

0 commit comments

Comments
 (0)