Skip to content

Commit

Permalink
spi: propagate error code to the caller of acpi_spi_device_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Mark Brown committed Jul 11, 2022
1 parent 9c22ec4 commit b6747f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) &&
Expand Down

0 comments on commit b6747f4

Please sign in to comment.