Commit f744c86c authored by Jeff Ohlstein's avatar Jeff Ohlstein Committed by Kuirong Wang
Browse files

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: default avatarJeff Ohlstein <johlstei@codeaurora.org>
parent a4895602
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment