[PATCH] fcoe: unsigned long can never be negative

From: Alan Cox
Date: Wed Jul 04 2012 - 10:37:26 EST


From: Alan Cox <alan@xxxxxxxxxxxxxxx>

Coverity id: 703581

Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
---

drivers/scsi/fcoe/fcoe_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 2bc1631..5e75168 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/