From 10e927249c4f78b25c4941eda93548aeaad04a46 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Tue, 26 Jan 2021 14:23:17 -0600 Subject: ACPI: Test for ACPI_SUCCESS rather than !ACPI_FAILURE The double negative makes it hard to read "if (!ACPI_FAILURE(status))". Replace it with "if (ACPI_SUCCESS(status))". Signed-off-by: Bjorn Helgaas Acked-by: Guenter Roeck Acked-by: Alex Deucher Acked-by: Takashi Iwai Acked-by: Mark Brown Signed-off-by: Rafael J. Wysocki --- drivers/hwmon/acpi_power_meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 848718ab7312..7d3ddcba34ce 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -161,7 +161,7 @@ static ssize_t set_avg_interval(struct device *dev, mutex_lock(&resource->lock); status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PAI", &args, &data); - if (!ACPI_FAILURE(status)) + if (ACPI_SUCCESS(status)) resource->avg_interval = temp; mutex_unlock(&resource->lock); @@ -232,7 +232,7 @@ static ssize_t set_cap(struct device *dev, struct device_attribute *devattr, mutex_lock(&resource->lock); status = acpi_evaluate_integer(resource->acpi_dev->handle, "_SHL", &args, &data); - if (!ACPI_FAILURE(status)) + if (ACPI_SUCCESS(status)) resource->cap = temp; mutex_unlock(&resource->lock); -- cgit v1.2.3