diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2022-08-02 17:06:30 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-09-05 12:01:55 +0530 |
commit | 64787536ccfc072dca9b2c7c06c84dcc3f139b10 (patch) | |
tree | d8bcbd7186a29e96d6b474f0474142949317a1cf /drivers/dma | |
parent | c0c269becf1f5b649b66a7f3eb60ff7e9aa8976d (diff) |
dmaengine: at_xdmac: Replace two if statements with only one with two conditions
Add a cosmetic change and replace two if statements with a single if
statement with two conditions. In case the optional txstate parameter is
NULL, we return the dma_cookie_status, which is fine, no functional change
required.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20220802140630.243550-1-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/at_xdmac.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index b102d8eb5d83..d6c9781cd46a 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1470,10 +1470,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, bool initd; ret = dma_cookie_status(chan, cookie, txstate); - if (ret == DMA_COMPLETE) - return ret; - - if (!txstate) + if (ret == DMA_COMPLETE || !txstate) return ret; spin_lock_irqsave(&atchan->lock, flags); |