Commit 947cba67 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] Pointer dereference before NULL check in ACPI thermal driver

Again, found with coverity's checker.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e3c82ec8
...@@ -659,7 +659,7 @@ acpi_thermal_check ( ...@@ -659,7 +659,7 @@ acpi_thermal_check (
struct acpi_thermal *tz = (struct acpi_thermal *) data; struct acpi_thermal *tz = (struct acpi_thermal *) data;
unsigned long sleep_time = 0; unsigned long sleep_time = 0;
int i = 0; int i = 0;
struct acpi_thermal_state state = tz->state; struct acpi_thermal_state state;
ACPI_FUNCTION_TRACE("acpi_thermal_check"); ACPI_FUNCTION_TRACE("acpi_thermal_check");
...@@ -668,6 +668,8 @@ acpi_thermal_check ( ...@@ -668,6 +668,8 @@ acpi_thermal_check (
return_VOID; return_VOID;
} }
state = tz->state;
result = acpi_thermal_get_temperature(tz); result = acpi_thermal_get_temperature(tz);
if (result) if (result)
return_VOID; return_VOID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment