[PATCH 5.10 21/21] thermal: Fix NULL pointer dereferences in of_thermal_ functions