Skip to contentSkip to conversation

spi: Fix the return value in spi_new_ancillary_device() kernel-doc

PATCH In review Karl Mehltretter 2 participants 2 messages Sep 11 – Sep 14 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: Fix the return value in spi_new_ancillary_device() kernel-doc

spi_new_ancillary_device() returns the new struct spi_device, or an ERR_PTR() on failure, but its kernel-doc says "0 on success; negative errno on failure", which was never true. Describe the pointer.

Fixes 0c79378c0199 ("spi: add ancillary device support")
Assisted-by LLM
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi.c +1 -1
index 5b5b3bc5f0d8cf8ba60a1785acc695710865edad..172141650b648694d4163d0ba00746ed2948ccfa 100644
@@ -2893,7 +2893,7 @@ static void of_register_spi_devices(struct spi_controller *ctlr) { }
  *
  * This may only be called from main SPI device's probe routine.
  *
- * Return: 0 on success; negative errno on failure
+ * Return: the new device on success; an ERR_PTR() on failure
  */
 struct spi_device *spi_new_ancillary_device(struct spi_device *spi,
 					     u8 chip_select)
Signature · 1 line
2.39.5 (Apple Git-154)
maintainer
#1 lore raw
Quoted 1 line · Karl Mehltretter

spi: Fix the return value in spi_new_ancillary_device() kernel-doc

Applied to

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

Thanks!

[1/1] spi: Fix the return value in spi_new_ancillary_device() kernel-doc

      https://git.kernel.org/broonie/spi/c/3742867ce965

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