hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value check

Since acpi_bus_get_device() returns plain int and not acpi_status,
ACPI_FAILURE() should not be used for checking its return value.  Fix
that.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Yijing Wang 2013-11-20 17:28:23 +08:00 committed by Guenter Roeck
parent cc76dee17f
commit 3a4cbc1906

View file

@ -602,9 +602,8 @@ static int read_domain_devices(struct acpi_power_meter_resource *resource)
/* Create a symlink to domain objects */
resource->domain_devices[i] = NULL;
status = acpi_bus_get_device(element->reference.handle,
&resource->domain_devices[i]);
if (ACPI_FAILURE(status))
if (acpi_bus_get_device(element->reference.handle,
&resource->domain_devices[i]))
continue;
obj = resource->domain_devices[i];