dmaengine: at_xdmac: Replace two if statements with only one with two conditions
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/dma/at_xdmac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/dma/at_xdmac.c +1 -4
@@ -1463,10 +1463,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);
Signature · 1 line
2.25.1
Quoted 4 lines · Tudor Ambarus
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.
Applied, thanks
Signature · 1 line
~Vinod