hwmon: (acpi_power_meter) Fix unintentional integer overflow
authorGuenter Roeck <linux@roeck-us.net>
Thu, 21 Jun 2012 13:21:05 +0000 (06:21 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jul 2012 04:48:44 +0000 (21:48 -0700)
commit75311bea569d7ea77a5a3c5395bae27bb8a2df96
tree2ce0cbffa47a9af6640a22f536d081a14d3a85f3
parent27c4db3996ef0d27fb25e6991ebf6e507a920937
hwmon: (acpi_power_meter) Fix unintentional integer overflow

Expression with two integer variables is calculated as integer before it is
converted to u64. This may result in an integer overflow. Fix by declaring
trip point variables as s64 instead of int.

This patch addresses Coverity #200596: Unintentional integer overflow.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/acpi_power_meter.c