check u32 < 0 in hwmon/fscpos.c
Subsystems (2)
PATCH 1/1 check u32 < 0 in hwmon/fscpos.c
hi,
yet another check < 0. Since data->pwm is u8 i removed the check. Maybe v should be u8 and simple_strtoul() casted to u8, so we can remove both checks. If this is the case, i would create a patch to convert all those cases in the file.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/hwmon/fscpos.c renamed from drivers/hwmon/fscpos.c.orig +0 -1
@@ -229,7 +229,6 @@ static ssize_t set_pwm(struct i2c_clientunsigned long v =simple_strtoul (buf,NULL ,10 );/* Range: 0..255 */ -if (v <0 ) v =0 ;if (v >255 ) v =255 ;down (&data->update_lock);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors