* [PATCH] spi: clean up controller registration return value
@ 2026-04-29 9:23 Johan Hovold
2026-04-30 1:49 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2026-04-29 9:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-kernel, Johan Hovold
Return explicit zero on successful controller registration to make the
code more readable.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/spi/spi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 104279858f56..5f57de24b9f7 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3552,7 +3552,8 @@ int spi_register_controller(struct spi_controller *ctlr)
/* Register devices from the device tree and ACPI */
of_register_spi_devices(ctlr);
acpi_register_spi_devices(ctlr);
- return status;
+
+ return 0;
del_ctrl:
device_del(&ctlr->dev);
@@ -3560,6 +3561,7 @@ int spi_register_controller(struct spi_controller *ctlr)
mutex_lock(&board_lock);
idr_remove(&spi_controller_idr, ctlr->bus_num);
mutex_unlock(&board_lock);
+
return status;
}
EXPORT_SYMBOL_GPL(spi_register_controller);
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: clean up controller registration return value
2026-04-29 9:23 [PATCH] spi: clean up controller registration return value Johan Hovold
@ 2026-04-30 1:49 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-04-30 1:49 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-spi, linux-kernel
On Wed, 29 Apr 2026 11:23:01 +0200, Johan Hovold wrote:
> spi: clean up controller registration return value
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.2
Thanks!
[1/1] spi: clean up controller registration return value
https://git.kernel.org/broonie/spi/c/54dac8230d9c
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-30 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 9:23 [PATCH] spi: clean up controller registration return value Johan Hovold
2026-04-30 1:49 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox