aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-07-09 03:07:08 +0300
committerMark Brown <broonie@kernel.org>2022-07-11 12:06:40 +0100
commitb6747f4fba399a73a87fac80ac1d0c952a44b222 (patch)
tree35ffacfece08d5e8c35b92cf596b433968963fdc /drivers/spi/spi.c
parentspi: Return deferred probe error when controller isn't yet available (diff)
downloadlinux-dev-b6747f4fba399a73a87fac80ac1d0c952a44b222.tar.xz
linux-dev-b6747f4fba399a73a87fac80ac1d0c952a44b222.zip
spi: propagate error code to the caller of acpi_spi_device_alloc()
Since acpi_spi_device_alloc() has been designed to return an error pointer we may now properly propagate error codes to the caller of it. It helps debugging a lot. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220709000709.35622-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-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 2ec508ad8c2b..46c8f3ff89cb 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2559,7 +2559,7 @@ struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr,
if (ret < 0)
/* Found SPI in _CRS but it points to another controller */
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
if (!lookup.max_speed_hz &&
ACPI_SUCCESS(acpi_get_parent(adev->handle, &parent_handle)) &&