adt746x: test below 0 on unsigned val
Subsystems (2)
PATCH 5/9 adt746x: test below 0 on unsigned val
val is unsigned so the test doesn't work.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/macintosh/therm_adt746x.c +1 -1
@@ -500,7 +500,7 @@ static ssize_t store_##name(struct device *dev, struct device_attribute *attr, c { \u32 val; \ val =simple_strtoul (buf,NULL ,10 ); \ -if (val <0 || val >255 ) \ +if (val >255 ) \return -EINVAL ; \printk (KERN_INFO "Setting specified fan speed to %d\n" , val); \ data = val; \