summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel_mid_thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/intel_mid_thermal.c')
-rw-r--r--drivers/platform/x86/intel_mid_thermal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index f402e2e74a38..f12f4e7bd971 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -493,6 +493,12 @@ static int mid_thermal_probe(struct platform_device *pdev)
ret = PTR_ERR(pinfo->tzd[i]);
goto err;
}
+ ret = thermal_zone_device_enable(pinfo->tzd[i]);
+ if (ret) {
+ kfree(td_info);
+ thermal_zone_device_unregister(pinfo->tzd[i]);
+ goto err;
+ }
}
pinfo->pdev = pdev;