[PATCH openEuler-1.0-LTS] thermal: Fix NULL pointer dereferences in of_thermal_ functions