|
@@ -475,11 +475,14 @@ static void exynos_unregister_thermal(void)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- if (th_zone && th_zone->therm_dev)
|
|
|
|
|
|
+ if (!th_zone)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if (th_zone->therm_dev)
|
|
thermal_zone_device_unregister(th_zone->therm_dev);
|
|
thermal_zone_device_unregister(th_zone->therm_dev);
|
|
|
|
|
|
for (i = 0; i < th_zone->cool_dev_size; i++) {
|
|
for (i = 0; i < th_zone->cool_dev_size; i++) {
|
|
- if (th_zone && th_zone->cool_dev[i])
|
|
|
|
|
|
+ if (th_zone->cool_dev[i])
|
|
cpufreq_cooling_unregister(th_zone->cool_dev[i]);
|
|
cpufreq_cooling_unregister(th_zone->cool_dev[i]);
|
|
}
|
|
}
|
|
|
|
|