diff mbox series

[2/2] scsi: qla2xxx: Fix error code in qla2x00_start_sp()

Message ID 49866d28-4cfe-47b0-842b-78f110e61aab@moroto.mountain
State New
Headers show
Series [1/2] scsi: qla2xxx: silence a static checker warning | expand

Commit Message

Dan Carpenter June 26, 2023, 10:58 a.m. UTC
This should be negative -EAGAIN instead of positive.  The callers
treat non-zero error codes the same so it doesn't really impact
runtime beyond some trivial differences to debug output.

Fixes: 80676d054e5a ("scsi: qla2xxx: Fix session cleanup hang")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/scsi/qla2xxx/qla_iocb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen July 6, 2023, 1:30 a.m. UTC | #1
Dan,

> This should be negative -EAGAIN instead of positive. The callers treat
> non-zero error codes the same so it doesn't really impact runtime
> beyond some trivial differences to debug output.

Applied to 6.5/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 9c70c4e973ee..730d8609276c 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -3912,7 +3912,7 @@  qla2x00_start_sp(srb_t *sp)
 
 	pkt = __qla2x00_alloc_iocbs(sp->qpair, sp);
 	if (!pkt) {
-		rval = EAGAIN;
+		rval = -EAGAIN;
 		ql_log(ql_log_warn, vha, 0x700c,
 		    "qla2x00_alloc_iocbs failed.\n");
 		goto done;