[PATCH 5.15 091/204] thermal: Validate new state in cur_state_store()