Skip to content

Commit

Permalink
hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yijing Wang authored and Guenter Roeck committed Nov 20, 2013
1 parent cc76dee commit 3a4cbc1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/hwmon/acpi_power_meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3a4cbc1

Please sign in to comment.