msm: thermal: improve robustness of the thermal throttle routine.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>