thermal: Fix sensor thresholds not accounted correctly

Sensor threshold min and max are calculated to be binding around the
current temp, but they fail if there no thresholds available with the
min < curr_temp and the max > curr_temp.

Fix negative temperatures handling.

Change-Id: Ie4fb5ca2cdaf430b98c3665773a8d55ac9db5359
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
2 files changed