spi: ti-qspi: cleanup registration error path

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>
Link: https://patch.msgid.link/20260505072909.618363-19-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Johan Hovold 2026-05-05 09:29:07 +02:00 committed by Mark Brown
parent 76a24627b9
commit f8689d5a9e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

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