Skip to contentSkip to conversation

scsi: elx: libefc: signedness bug in efc_d_send_prli_rsp()

PATCH In review Dan Carpenter 2 participants 2 messages Jun 18, 2021 – Jun 19, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: elx: libefc: signedness bug in efc_d_send_prli_rsp()

The "rc" variable needs to be signed for the error handling to work. It holds either a negative error code, EFC_SCSI_CALL_COMPLETE (0), or EFC_SCSI_CALL_ASYNC (1).

Fixes 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling")
---
 drivers/scsi/elx/libefc/efc_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/elx/libefc/efc_device.c +1 -1
index 31a688bce6e9..725ca2a23fb2 100644
@@ -15,7 +15,7 @@
 void
 efc_d_send_prli_rsp(struct efc_node *node, u16 ox_id)
 {
-	u32 rc = EFC_SCSI_CALL_COMPLETE;
+	int rc = EFC_SCSI_CALL_COMPLETE;
 	struct efc *efc = node->efc;
 
 	node->ls_acc_oxid = ox_id;
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dan Carpenter

The "rc" variable needs to be signed for the error handling to work. It holds either a negative error code, EFC_SCSI_CALL_COMPLETE (0), or EFC_SCSI_CALL_ASYNC (1).

Fixes 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling")
---
  drivers/scsi/elx/libefc/efc_device.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

-- james