Re: [PATCH][next] scsi: elx: libefc: Fix less than zero comparison of a unsigned int

From: James Smart
Date: Sat Jun 19 2021 - 11:46:32 EST


On 6/16/2021 10:04 AM, Colin King wrote:
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

The comparison of the u32 variable rc to less than zero always
false because it is unsigned. Fix this by making it an int.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
drivers/scsi/elx/libefc/efc_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

Reviewed-by: James Smart <jsmart2021@xxxxxxxxx>

-- james