mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
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>
This commit is contained in:
parent
5c66d9393f
commit
eea422709f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user