Skip to content

Commit

Permalink
thermal: exynos: Fix potential NULL pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Eduardo Valentin committed Aug 29, 2013
1 parent 02ae59d commit 91ff81c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/thermal/samsung/exynos_thermal_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 91ff81c

Please sign in to comment.