summaryrefslogtreecommitdiff
path: root/drivers/scsi/elx/libefc
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-06-16 18:04:01 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-18 23:01:04 -0400
commit99cf922692021823bd2f87aa307fa6cb28e91ad1 (patch)
tree0f7746836a4aa8efb4ecc5d7a3009f57a63817b8 /drivers/scsi/elx/libefc
parentae3272ec5e9772de143b6326b2c3a61529786ddd (diff)
downloadlwn-99cf922692021823bd2f87aa307fa6cb28e91ad1.tar.gz
lwn-99cf922692021823bd2f87aa307fa6cb28e91ad1.zip
scsi: elx: libefc: Fix less than zero comparison of a unsigned int
The comparison of the u32 variable rc to less than zero always false because it is unsigned. Fix this by making it an int. Link: https://lore.kernel.org/r/20210616170401.15831-1-colin.king@canonical.com Fixes: 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Addresses-Coverity: ("Unsigned compared against 0")
Diffstat (limited to 'drivers/scsi/elx/libefc')
-rw-r--r--drivers/scsi/elx/libefc/efc_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/elx/libefc/efc_device.c b/drivers/scsi/elx/libefc/efc_device.c
index 31a688bce6e9..725ca2a23fb2 100644
--- a/drivers/scsi/elx/libefc/efc_device.c
+++ b/drivers/scsi/elx/libefc/efc_device.c
@@ -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;