summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/acpi_power_meter.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-11-20 10:28:23 +0100
committerGuenter Roeck <linux@roeck-us.net>2013-11-20 17:31:01 +0100
commit3a4cbc190643d0c6f7ca36a84af8367947f558c7 (patch)
treec64260637872287617d9cfaf962b975730d4ec87 /drivers/hwmon/acpi_power_meter.c
parenthwmon: (nct6775) NCT6791 supports weight control only for CPUFAN (diff)
downloadlinux-3a4cbc190643d0c6f7ca36a84af8367947f558c7.tar.xz
linux-3a4cbc190643d0c6f7ca36a84af8367947f558c7.zip
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>
Diffstat (limited to 'drivers/hwmon/acpi_power_meter.c')
-rw-r--r--drivers/hwmon/acpi_power_meter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 8d40da314a8e..6a34f7f48eb9 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -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];