Skip to content

Commit eea4227

Browse files
Colin Ian Kingmartinkpetersen
authored andcommitted
scsi: fc: remove redundant check of an unsigned long being less than zero
The check for an unsigned long being less than zero is always false so it is a redundant check and can be removed. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5c66d93 commit eea4227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/scsi_transport_fc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ static int fc_str_to_dev_loss(const char *buf, unsigned long *val)
850850
char *cp;
851851

852852
*val = simple_strtoul(buf, &cp, 0);
853-
if ((*cp && (*cp != '\n')) || (*val < 0))
853+
if (*cp && (*cp != '\n'))
854854
return -EINVAL;
855855
/*
856856
* Check for overflow; dev_loss_tmo is u32

0 commit comments

Comments
 (0)