OSDN Git Service

hwmon: (ds620) Fix overflows seen when writing temperature limits
authorGuenter Roeck <linux@roeck-us.net>
Sun, 20 Nov 2016 18:37:39 +0000 (10:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:48 +0000 (11:22 +0100)
commit5e351caeaa96f1eafb527b4606535745fcce6577
tree89e2e66461421cf7ab85eb8cd6759d9d60750f02
parentfbab1832e7e824fe8b588de68914641ac1d61b40
hwmon: (ds620) Fix overflows seen when writing temperature limits

commit e36ce99ee0815d7919a7b589bfb66f3de50b6bc7 upstream.

Module test reports:

temp1_max: Suspected overflow: [160000 vs. 0]
temp1_min: Suspected overflow: [160000 vs. 0]

This is seen because the values passed when writing temperature limits
are unbound.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Fixes: 6099469805c2 ("hwmon: Support for Dallas Semiconductor DS620")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/ds620.c