Skip to contentSkip to conversation

ACPI/hwmon: Fix acpi_bus_get_device() return value check

PATCH Applied Yijing Wang 2 participants 2 messages Nov 20, 2013 Hardware monitoring

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ACPI/hwmon: 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.

---
 drivers/hwmon/acpi_power_meter.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/hwmon/acpi_power_meter.c +2 -3
index 8d40da3..6a34f7f 100644
@@ -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];
Signature · 8 lines
1.7.1



_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors