]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (sht15) Fix integer overflow in humidity calculation
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 21 Mar 2011 16:59:35 +0000 (17:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Mar 2011 14:31:18 +0000 (07:31 -0700)
commit19333e59fe55be71ee6842f725c25671da91fda7
tree6eb49d480ca1d242c6ca425e1163b607583edb77
parentfb40a2dbea4eb5f5d422ed8cd85237b9375f4421
hwmon: (sht15) Fix integer overflow in humidity calculation

commit ccd32e735de7a941906e093f8dca924bb05c5794 upstream.

An integer overflow occurs in the calculation of RHlinear when the
relative humidity is greater than around 30%. The consequence is a subtle
(but noticeable) error in the resulting humidity measurement.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/sht15.c