diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-27 14:01:02 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-28 12:55:59 +0200 |
commit | 9b5c7a5a977a330ffaf83c4d383ba247c74c800f (patch) | |
tree | 43dbd7adfaf40ad4cab7b0d20c2c9bb4c4c01615 /drivers/acpi/fan.c | |
parent | fa1675b56537651270e79967b7f1ee4202c83bf6 (diff) |
ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state()
After commit fa1675b (ACPI / PM: Rework and clean up
acpi_dev_pm_get_state()) a NULL pointer dereference will take place
if NULL is passed to acpi_pm_device_sleep_state() as the second
argument.
Fix that by avoiding to use the pointer that may be NULL until
it's necessary to store a return value at the location pointed to
by it (if not NULL).
Reported-and-tested-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/fan.c')
0 files changed, 0 insertions, 0 deletions