Skip to contentSkip to conversation

libfcoe: remove and unneeded check

PATCH New Dan Carpenter 1 participant 1 message Jun 7, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libfcoe: remove and unneeded check

Unsigned values are never less than zero. We check for an upper bound later so that's OK too.

drivers/scsi/fcoe/fcoe_sysfs.c +2 -2
index 2bc1631..6e402f6 100644
@@ -102,8 +102,8 @@ static int fcoe_str_to_dev_loss(const char *buf, unsigned long *val)
 	int ret;
 
 	ret = kstrtoul(buf, 0, val);
-	if (ret || *val < 0)
-		return -EINVAL;
+	if (ret)
+		return ret;
 	/*
 	 * Check for overflow; dev_loss_tmo is u32
 	 */