mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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:
parent
cc76dee17f
commit
3a4cbc1906
1 changed files with 2 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue