lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 18/20] spi: ti-qspi: cleanup registration error path
Date
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

\
 
 \ /
  Last update: 2026-05-05 09:35    [W:0.181 / U:24.141 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog