Skip to content
Commit 27c4db39 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (acpi_power_meter) Cleanup and optimizations



An unsigned value can not be smaller than 0. Remove the check for it.
Use DIV_ROUND_CLOSEST for divide operations converting milli-degrees C into
degrees C. Limit maximum accepted trip point temperature to INT_MAX.

This patch fixes Coverity #115214: Unsigned compared against 0

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
parent 27f8b135
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment