Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339272
b: refs/heads/master
c: 791700c
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Zhang Rui committed Nov 5, 2012
1 parent 91a5879 commit b0fe924
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a56757af8e7d7d8bfb6317c25b6a8809abfceb9a
refs/heads/master: 791700cdfc2453eb927ff7875d183d9808d89bfb
9 changes: 5 additions & 4 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ static void bind_cdev(struct thermal_cooling_device *cdev)
}

tzp = pos->tzp;
if (!tzp->tbp)
return;
if (!tzp || !tzp->tbp)
continue;

for (i = 0; i < tzp->num_tbps; i++) {
if (tzp->tbp[i].cdev || !tzp->tbp[i].match)
Expand Down Expand Up @@ -289,7 +289,7 @@ static void bind_tz(struct thermal_zone_device *tz)
goto exit;
}

if (!tzp->tbp)
if (!tzp || !tzp->tbp)
goto exit;

list_for_each_entry(pos, &thermal_cdev_list, node) {
Expand Down Expand Up @@ -387,12 +387,13 @@ static void update_temperature(struct thermal_zone_device *tz)
ret = tz->ops->get_temp(tz, &temp);
if (ret) {
pr_warn("failed to read out thermal zone %d\n", tz->id);
return;
goto exit;
}

tz->last_temperature = tz->temperature;
tz->temperature = temp;

exit:
mutex_unlock(&tz->lock);
}

Expand Down

0 comments on commit b0fe924

Please sign in to comment.