[PATCH 4.9 22/92] thermal: Fix use-after-free when unregistering thermal zone device