[COMMON] thermal: samsung: Print error code
authorSoomin Kim <sm8326.kim@samsung.com>
Tue, 12 Jul 2016 08:25:19 +0000 (17:25 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:28 +0000 (17:09 +0900)
Print error code when cooling device registration
is failed.

Change-Id: Iedc2d4b16188fa199ef42d24da07c53a25a6643b
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
drivers/thermal/samsung/exynos_tmu.c

index 593d61927b68ac987119183f07369e53c32cea54..8f74f26a2edd4e03aed019b5b1ac0fac8fb3bbb3 100644 (file)
@@ -1189,9 +1189,9 @@ static int exynos_cpufreq_cooling_register(struct exynos_tmu_data *data)
        ggchild = of_get_next_child(gchild, NULL);
        ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells",
                                         0, &cooling_spec);
-       if (ret < 0) {
-               pr_err("exynos_tmu do not get cooling spec \n");
-       }
+       if (ret < 0)
+               pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret);
+
        cool_np = cooling_spec.np;
 
        for_each_possible_cpu(cpu) {
@@ -1229,9 +1229,9 @@ static int exynos_gpufreq_cooling_register(struct exynos_tmu_data *data)
        ggchild = of_get_next_child(gchild, NULL);
        ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells",
                                         0, &cooling_spec);
-       if (ret < 0) {
-               pr_err("exynos_tmu do not get cooling spec \n");
-       }
+       if (ret < 0)
+               pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret);
+
        cool_np = cooling_spec.np;
 
        data->cool_dev = of_gpufreq_cooling_register(cool_np, NULL);
@@ -1266,9 +1266,9 @@ static int exynos_isp_cooling_register(struct exynos_tmu_data *data)
        ggchild = of_get_next_child(gchild, NULL);
        ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells",
                                         0, &cooling_spec);
-       if (ret < 0) {
-               pr_err("exynos_tmu do not get cooling spec \n");
-       }
+       if (ret < 0)
+               pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret);
+
        cool_np = cooling_spec.np;
 
        data->cool_dev = of_isp_cooling_register(cool_np, NULL);