Skip to content

Commit 83c1961

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_hdmac: Return dma_cookie_status()'s ret code when txstate is NULL
txstate is an optional parameter used to get a struct with auxilary transfer status information. When not provided the call to device_tx_status() should return the status of the dma cookie. Return the status of dma cookie when the txstate optional parameter is not provided. Signed-off-by: Tudor Ambarus <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4c2e9ba commit 83c1961

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/dma/at_hdmac.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,14 +1461,8 @@ atc_tx_status(struct dma_chan *chan,
14611461
int bytes = 0;
14621462

14631463
ret = dma_cookie_status(chan, cookie, txstate);
1464-
if (ret == DMA_COMPLETE)
1464+
if (ret == DMA_COMPLETE || !txstate)
14651465
return ret;
1466-
/*
1467-
* There's no point calculating the residue if there's
1468-
* no txstate to store the value.
1469-
*/
1470-
if (!txstate)
1471-
return DMA_ERROR;
14721466

14731467
spin_lock_irqsave(&atchan->lock, flags);
14741468

0 commit comments

Comments
 (0)