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>
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