[PATCH AUTOSEL 4.9 11/19] thermal: Fix use-after-free when unregistering thermal zone device