Skip to content

Commit

Permalink
thermal: exynos: Correct sanity check at exynos_report_trigger() func…
Browse files Browse the repository at this point in the history
…tion

Up till now, by mistake, wrong variable was tested against being NULL.
Since exynos_report_trigger() is always called with valid p pointer,
it is only necessary to check if a valid thermal zone device is passed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Lukasz Majewski authored and Eduardo Valentin committed Jan 28, 2015
1 parent d3a5247 commit eccb601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/samsung/exynos_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ static void exynos_report_trigger(struct exynos_tmu_data *p)
unsigned long temp;
unsigned int i;

if (!p) {
pr_err("Wrong temperature configuration data\n");
if (!tz) {
pr_err("No thermal zone device defined\n");
return;
}

Expand Down

0 comments on commit eccb601

Please sign in to comment.