diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-08-19 11:58:42 +0530 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2013-11-15 13:52:53 +0900 |
commit | 70cf1aacb024bccd8f54d3dc0ef4ea824bdd6faa (patch) | |
tree | 4f700b77d81f0931b15e4dca904ebf24cc08f909 | |
parent | a7378a5eb1d638587d52e2f6cd6ecaee2e50fa81 (diff) | |
download | linux-3.10-70cf1aacb024bccd8f54d3dc0ef4ea824bdd6faa.tar.gz linux-3.10-70cf1aacb024bccd8f54d3dc0ef4ea824bdd6faa.tar.bz2 linux-3.10-70cf1aacb024bccd8f54d3dc0ef4ea824bdd6faa.zip |
thermal: exynos: Fix potential NULL pointer dereference
NULL pointer was being dereferenced in its own error message.
Changed it to the correct device pointer.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
-rw-r--r-- | drivers/thermal/samsung/exynos_thermal_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c index 4d8e4445ea1..f10a6ad37c0 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -53,7 +53,7 @@ static int exynos_set_mode(struct thermal_zone_device *thermal, { struct exynos_thermal_zone *th_zone = thermal->devdata; if (!th_zone) { - dev_err(th_zone->sensor_conf->dev, + dev_err(&thermal->device, "thermal zone not registered\n"); return 0; } @@ -231,7 +231,7 @@ static int exynos_get_temp(struct thermal_zone_device *thermal, void *data; if (!th_zone->sensor_conf) { - dev_err(th_zone->sensor_conf->dev, + dev_err(&thermal->device, "Temperature sensor not initialised\n"); return -EINVAL; } @@ -251,7 +251,7 @@ static int exynos_set_emul_temp(struct thermal_zone_device *thermal, struct exynos_thermal_zone *th_zone = thermal->devdata; if (!th_zone->sensor_conf) { - dev_err(th_zone->sensor_conf->dev, + dev_err(&thermal->device, "Temperature sensor not initialised\n"); return -EINVAL; } |