mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc
@ 2026-09-11 23:02 Karl Mehltretter
  2026-09-12 10:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Mehltretter @ 2026-09-11 23:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: Karl Mehltretter, Sebastian Reichel, linux-spi, linux-kernel

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
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 5b5b3bc5f0d8cf8ba60a1785acc695710865edad..172141650b648694d4163d0ba00746ed2948ccfa 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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)
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-14  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 23:02 [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Karl Mehltretter
2026-09-12 10:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®