thermal: msm8960_tsens: nullify tmdev when early_init fails
The initialization code uses the tmdev variable as an indicator as to whether or not early initialization succeeded. However, when early init fails, it only kfrees the pointer, it doesn't set it to NULL. This causes us to dereference the now-freed pointer. Additionally, squash the message that prints each time we fail to read the temperature sensor, and print a warning to the kernel log when tsens calibration data is not present. Change-Id: Iab400cac687cdbc36d8c69541675c29a0b82c704 Signed-off-by:Jeff Ohlstein <johlstei@codeaurora.org> Signed-off-by:
David Brown <davidb@codeaurora.org>
Loading
Please register or sign in to comment