drivers: thermal: Check NULL pointer before using it in thermal stat update
There is a possible chance that some cooling device stats init fails
and later cooling device update or cooling stats sysfs will try to
access stats data for the same cooling device. It may lead to some
unexpected behaviour.
Add a NULL pointer check before accessing thermal cooling device stats
data.
Change-Id: Ieeb84adf0e5d3575ed06b9c64361bbbf902f984e
Signed-off-by:
Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Loading
Please register or sign in to comment