Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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