Commit eea42270 authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen

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: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5c66d939
......@@ -850,7 +850,7 @@ static int fc_str_to_dev_loss(const char *buf, unsigned long *val)
char *cp;
*val = simple_strtoul(buf, &cp, 0);
if ((*cp && (*cp != '\n')) || (*val < 0))
if (*cp && (*cp != '\n'))
return -EINVAL;
/*
* Check for overflow; dev_loss_tmo is u32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment