[PATCH 6.1 135/313] thermal: Validate new state in cur_state_store()