]> 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)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:43 +0000 (11:58 -0700)
commit4d5afe547f5edb659a7813d8190842da14618808
treef146013659e588a90c9fa2100ae51a8b028dc125
parentef8844ee3f2c657b1e5a92250721dc1c73c96c9a
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/sht15.c