spi: clean up controller registration return value

Return explicit zero on successful controller registration to make the
code more readable.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260429092301.166375-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Johan Hovold 2026-04-29 11:23:01 +02:00 committed by Mark Brown
parent 211ef7d627
commit 54dac8230d
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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);