]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: fix misleading controller registration kernel-doc
authorJohan Hovold <johan@kernel.org>
Thu, 12 Mar 2026 15:18:16 +0000 (16:18 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Mar 2026 18:36:05 +0000 (18:36 +0000)
The controller reference count is not decremented on registration
failures (and has not been for a very long time) contrary to what the
outdated kernel-doc says.

Drop the entire sentence about return values which are now documented in
the Return section.

Fixes: b885244eb262 ("[PATCH] spi: add spi_driver to SPI framework")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260312151817.32100-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index bfc42b75549a2555ad234e428af197d146c8300b..34aca18a96d8a595f5891837e4d0cb45e86fb310 100644 (file)
@@ -3388,8 +3388,8 @@ static int spi_controller_id_alloc(struct spi_controller *ctlr, int start, int e
  * device identification, boards need configuration tables telling which
  * chip is at which address.
  *
- * This must be called from context that can sleep.  It returns zero on
- * success, else a negative error code (dropping the controller's refcount).
+ * This must be called from context that can sleep.
+ *
  * After a successful return, the caller is responsible for calling
  * spi_unregister_controller().
  *