diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-31 23:54:05 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-31 23:54:05 +0400 |
commit | 0613e1f7fd98a0cef2a7add1368a87cdd86a1106 (patch) | |
tree | fd8c7d1c3a054d15d11ae94ca5dcf4be8b169f17 /drivers/acpi | |
parent | c511cc1990bbc263c3f8a2ef4d7d613a3b40ffe2 (diff) | |
download | linux-0613e1f7fd98a0cef2a7add1368a87cdd86a1106.tar.xz |
ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
Since acpi_bus_get_device() returns int and not acpi_status, change
acpi_match_device() so that it doesn't apply ACPI_FAILURE() to the
return value of acpi_bus_get_device().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 43754655c156..a4224727f09c 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -444,9 +444,9 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids, const struct device *dev) { struct acpi_device *adev; + acpi_handle handle = ACPI_HANDLE(dev); - if (!ids || !ACPI_HANDLE(dev) - || ACPI_FAILURE(acpi_bus_get_device(ACPI_HANDLE(dev), &adev))) + if (!ids || !handle || acpi_bus_get_device(handle, &adev)) return NULL; return __acpi_match_device(adev, ids); |