提交 0613e1f7 编写于 作者: R Rafael J. Wysocki

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: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: NYinghai Lu <yinghai@kernel.org>
Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
上级 c511cc19
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册