[PATCH AUTOSEL 4.14 18/29] thermal: Fix use-after-free when unregistering thermal zone device