提交 3a4cbc19 编写于 作者: Y Yijing Wang 提交者: Guenter Roeck

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: NYijing Wang <wangyijing@huawei.com>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 cc76dee1
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册