diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-04-14 15:58:02 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-19 03:52:09 +0200 |
commit | eea422709fd89aec27be408f451557ebedd19f11 (patch) | |
tree | d58b9d733a74e5b21465dae2df2f816a47416777 /drivers/scsi | |
parent | scsi: ibmvfc: don't check for failure from mempool_alloc() (diff) | |
download | linux-eea422709fd89aec27be408f451557ebedd19f11.tar.xz linux-eea422709fd89aec27be408f451557ebedd19f11.zip |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 2d753c93e07a..87b8f9d64d9b 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -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 |