drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
[linux-2.6-microblaze.git] / drivers / thermal / thermal_of.c
index 5b76f9a..6379f26 100644 (file)
@@ -559,6 +559,9 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
        if (!tz)
                return;
 
+       /* stop temperature polling */
+       thermal_zone_device_disable(tzd);
+
        mutex_lock(&tzd->lock);
        tzd->ops->get_temp = NULL;
        tzd->ops->get_trend = NULL;