Commit
b0f0c761ed3fa10754dc9295db85374a173123b7
spi: spi-fsl-lpspi: directly return ret in fsl_lpspi_transfer_one()
Both fsl_lpspi_dma_transfer() and fsl_lpspi_pio_transfer() only return negative error values in case of error or 0 in case of success. Directly return ret, there is no need to check for positive error values and return them as 0. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20261009-spi-fsl-lpspi-more-cleanups-v1-2-2d4549d5205e@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Marc Kleine-Budde <mkl@pengutronix.de> · 2026-10-09 10:16 UTC · committed by Mark Brown
1 file changed,
+1
−3
modified drivers/spi/spi-fsl-lpspi.c
| @@ -799,10 +799,8 @@ static int fsl_lpspi_transfer_one(struct spi_controller *controller, | |||
| 799 | 799 | ret = fsl_lpspi_dma_transfer(controller, fsl_lpspi, t); | |
| 800 | 800 | else | |
| 801 | 801 | ret = fsl_lpspi_pio_transfer(fsl_lpspi, t); | |
| 802 | - | if (ret < 0) | |
| 803 | - | return ret; | |
| 804 | 802 | ||
| 805 | - | return 0; | |
| 803 | + | return ret; | |
| 806 | 804 | } | |
| 807 | 805 | ||
| 808 | 806 | static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id) | |