diff mbox series

[v1,1/2] spi: propagate error code to the caller of acpi_spi_device_alloc()

Message ID 20220709000709.35622-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit b6747f4fba399a73a87fac80ac1d0c952a44b222
Headers show
Series [v1,1/2] spi: propagate error code to the caller of acpi_spi_device_alloc() | expand

Commit Message

Andy Shevchenko July 9, 2022, 12:07 a.m. UTC
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>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown July 11, 2022, 12:46 p.m. UTC | #1
On Sat, 9 Jul 2022 03:07:08 +0300, Andy Shevchenko wrote:
> 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.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: propagate error code to the caller of acpi_spi_device_alloc()
      commit: b6747f4fba399a73a87fac80ac1d0c952a44b222
[2/2] spi: remove duplicate parameters check in acpi_spi_add_resource()
      commit: cdb0cc9379f1b4fa5ea3e0492bacf8008f3f4e5a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 0690f018c413..d4a8665410ea 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2565,7 +2565,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)) &&