[PATCH][next] spi: spi-ti-qspi: remove redundant assignment to variable ret
From: Colin Ian King
Date: Wed Oct 02 2024 - 12:27:07 EST
Variable ret is being assigned a value but it is never read, instead
the variable is being reassigned later in the exit path via label
no_dma. Remove the redundant assignment.
Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
---
drivers/spi/spi-ti-qspi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 0b8f496c6bf4..dfd4a7948c03 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -861,11 +861,10 @@ static int ti_qspi_probe(struct platform_device *pdev)
qspi->rx_chan = dma_request_chan_by_mask(&mask);
if (IS_ERR(qspi->rx_chan)) {
dev_err(qspi->dev,
"No Rx DMA available, trying mmap mode\n");
qspi->rx_chan = NULL;
- ret = 0;
goto no_dma;
}
qspi->rx_bb_addr = dma_alloc_coherent(qspi->dev,
QSPI_DMA_BUFFER_SIZE,
&qspi->rx_bb_dma_addr,
--
2.39.5