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:39:25 +0000 (11:39 +0100)
commita69a6ebd036a6c7edf89db09ca358927c158dbe4
tree1e4763bd0e830906b842a2945183a49645b83bb2
parent29e7b170db90a852b51409a76870cdbe57341a9b
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