[PATCH 5.14 14/15] thermal: Fix NULL pointer dereferences in of_thermal_ functions