]> 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>
Wed, 23 Mar 2011 19:50:46 +0000 (12:50 -0700)
commit4e3837bb22675cef56b921230f7604fe1a451a5f
treebcd51f4b49cc95027ece9bab0d2236054476ea25
parentc5243dd839aca1011b90ff0d810f4d6ea927f18f
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