Skip to contentSkip to conversation

fcoe: unsigned long can never be negative

PATCH New Alan Cox 1 participant 1 message Jul 4, 2012

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 fcoe: unsigned long can never be negative

From: Alan Cox <[email protected]>

Coverity id: 703581

---

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