From: Rafael J. Wysocki Date: Thu, 27 Jun 2013 12:01:02 +0000 (+0200) Subject: ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state() X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~19^2~4^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b5c7a5a977a330ffaf83c4d383ba247c74c800f;p=pandora-kernel.git 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 Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed