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/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/spi') diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 720ab34784c1..801d8b499788 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2210,7 +2210,7 @@ static acpi_status acpi_register_spi_device(struct spi_controller *ctlr, return AE_OK; if (!lookup.max_speed_hz && - !ACPI_FAILURE(acpi_get_parent(adev->handle, &parent_handle)) && + ACPI_SUCCESS(acpi_get_parent(adev->handle, &parent_handle)) && ACPI_HANDLE(ctlr->dev.parent) == parent_handle) { /* Apple does not use _CRS but nested devices for SPI slaves */ acpi_spi_parse_apple_properties(adev, &lookup); -- cgit v1.2.3