summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-01-26 23:23:17 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-27 20:43:07 +0300
commit10e927249c4f78b25c4941eda93548aeaad04a46 (patch)
treeff611ae1e1bbc07a0671e687b36086569ffa640f /drivers/spi
parent0f39ee8324e75c9d370e84a61323ceb194641a18 (diff)
downloadlinux-10e927249c4f78b25c4941eda93548aeaad04a46.tar.xz
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 <bhelgaas@google.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
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);