[PATCH] thermal: Fix a NULL pointer dereference