From 9d0ffeaf8701fe4c2a6185a2b405830ef2a161a8 Mon Sep 17 00:00:00 2001 From: Soomin Kim Date: Tue, 26 Jul 2016 14:32:22 +0900 Subject: [PATCH] [COMMON] thermal: samsung: Change ECT parsing error When there is no thermal zone data in ECT, just use default value defined in DT and don't make a error. Since thermal sensor registration can be processed normally, we can use the value defined in DT. Change-Id: Ia39ede8d87d7093fe7c055d0058601e2a1773e53 Signed-off-by: Soomin Kim --- drivers/thermal/of-thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 7dc6b768bc52..3c2ff8e8d40e 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -558,14 +558,14 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, thermal_block = ect_get_block(BLOCK_AP_THERMAL); if (thermal_block == NULL) { dev_err(dev, "Failed to get thermal block"); - return ERR_PTR(-EINVAL); + goto ect_exit; } pr_info("%s %d thermal zone_name = %s \n", __func__, __LINE__, tzd->type); function = ect_ap_thermal_get_function(thermal_block, tzd->type); if (function == NULL) { dev_err(dev, "Failed to get thermal block %s", tzd->type); - return ERR_PTR(-EINVAL); + goto ect_exit; } __tz->ntrips = __tz->num_tbps = function->num_of_range; @@ -631,7 +631,7 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, else tmu_data->hotplug_enable = false; #endif - +ect_exit: of_node_put(sensor_specs.np); of_node_put(child); goto exit; -- 2.20.1