mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
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:
parent
211ef7d627
commit
54dac8230d
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user