[PATCH 5.11 030/152] thermal/core: Add NULL pointer check before using cooling device stats