summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/device_pm.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-12-16 23:28:53 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-03 13:10:21 +0100
commit5cc36c724eb60b5e5457807f3230e5bb5454e4d0 (patch)
treed2e72538d0c1e3865c2703cdb6d223758eecf571 /drivers/acpi/device_pm.c
parentACPI / memhotplug: remove redundant logic of acpi memory hotadd (diff)
downloadlinux-5cc36c724eb60b5e5457807f3230e5bb5454e4d0.tar.xz
linux-5cc36c724eb60b5e5457807f3230e5bb5454e4d0.zip
ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
Since the return value of acpi_bus_get_device() is not of type acpi_status, ACPI_SUCCESS() should not be used for checking its return value. Fix that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r--drivers/acpi/device_pm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index f09dc987cf17..c6ff606c6d5b 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -358,8 +358,7 @@ static struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
struct acpi_device *adev;
- return handle && ACPI_SUCCESS(acpi_bus_get_device(handle, &adev)) ?
- adev : NULL;
+ return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL;
}
/**