Messages in this thread Patch in this message |  | | From | Johan Hovold <> | | Subject | [PATCH 18/20] spi: ti-qspi: cleanup registration error path | | Date | Tue, 5 May 2026 09:29:07 +0200 |
| |
Add a proper error path for when registration fails so that the probe tests for errors consistently.
Signed-off-by: Johan Hovold <johan@kernel.org> --- drivers/spi/spi-ti-qspi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 2a8548810f84..6b407c7b5d33 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -882,9 +882,12 @@ static int ti_qspi_probe(struct platform_device *pdev) qspi->current_cs = -1; ret = spi_register_controller(host); - if (!ret) - return 0; + if (ret) + goto err_free_dma; + + return 0; +err_free_dma: ti_qspi_dma_cleanup(qspi); pm_runtime_disable(&pdev->dev); -- 2.53.0
|  |