[COMMON] thermal: samsung: Change ECT parsing error
authorSoomin Kim <sm8326.kim@samsung.com>
Tue, 26 Jul 2016 05:32:22 +0000 (14:32 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:10 +0000 (17:13 +0900)
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 <sm8326.kim@samsung.com>
drivers/thermal/of-thermal.c

index 7dc6b768bc527d0bec4ca9ff39e3b8921b90188c..3c2ff8e8d40e2ef8b70aa90c1adcee8fff8236e2 100644 (file)
@@ -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;