Skip to content

Commit

Permalink
ACPI / PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c
Browse files Browse the repository at this point in the history
acpi_bus_get_device() returns int not acpi_status.

The patch change not to apply ACPI_FAILURE() to the return value of
acpi_bus_get_device().

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Yasuaki Ishimatsu authored and Rafael J. Wysocki committed Jan 31, 2013
1 parent 65ab96f commit dde3bb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/device_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in)
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
struct acpi_device *adev;

if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
if (!handle || acpi_bus_get_device(handle, &adev)) {
dev_dbg(dev, "ACPI handle without context in %s!\n", __func__);
return -ENODEV;
}
Expand Down Expand Up @@ -574,7 +574,7 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
return -EINVAL;

handle = DEVICE_ACPI_HANDLE(phys_dev);
if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
if (!handle || acpi_bus_get_device(handle, &adev)) {
dev_dbg(phys_dev, "ACPI handle without context in %s!\n",
__func__);
return -ENODEV;
Expand Down Expand Up @@ -618,7 +618,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
return -EINVAL;

handle = DEVICE_ACPI_HANDLE(dev);
if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
if (!handle || acpi_bus_get_device(handle, &adev)) {
dev_dbg(dev, "ACPI handle without context in %s!\n", __func__);
return -ENODEV;
}
Expand Down

0 comments on commit dde3bb4

Please sign in to comment.