]> git.baikalelectronics.ru Git - kernel.git/commit
spi: omap2-mcspi: Remove redundant checks
authorVignesh Raghavendra <vigneshr@ti.com>
Sat, 9 Nov 2019 04:18:27 +0000 (09:48 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 11 Nov 2019 12:50:26 +0000 (12:50 +0000)
commit26b7f0e4c1d6cdcc0b8772f9e7b60f1e0f11c161
treea2bb0795f0be7fbbb8cc6d5e4410755fe4b40d6f
parent3e96a0759b40fb25f9a563b75ff0fd75b8622862
spi: omap2-mcspi: Remove redundant checks

Both omap2_mcspi_tx_dma() and omap2_mcspi_rx_dma() are only called from
omap2_mcspi_txrx_dma() and omap2_mcspi_txrx_dma() is always called after
making sure that mcspi_dma->dma_rx and mcspi_dma->dma_tx are not NULL
(see omap2_mcspi_transfer_one()).
Therefore remove redundant NULL checks for omap2_mcspi->dma_tx and
omap2_mcspi->dma_rx pointers in omap2_mcspi_tx_dma() and
omap2_mcspi_rx_dma() respectively.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20191109041827.26934-1-vigneshr@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c