Skip to content

Commit 0f31c09

Browse files
ColinIanKingvinodkoul
authored andcommitted
dmaengine: xilinx: xdma: remove redundant check on ret
The variable ret is being checked for an error and returning ret and the following statement returns ret too. The if check is redundant, and remove it. Just return the value returned from the call to regmap_write. Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent bf9b083 commit 0f31c09

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/dma/xilinx/xdma.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,11 @@ static int xdma_xfer_start(struct xdma_chan *xchan)
390390
*/
391391
static int xdma_xfer_stop(struct xdma_chan *xchan)
392392
{
393-
int ret;
394393
struct xdma_device *xdev = xchan->xdev_hdl;
395394

396395
/* clear run stop bit to prevent any further auto-triggering */
397-
ret = regmap_write(xdev->rmap, xchan->base + XDMA_CHAN_CONTROL_W1C,
398-
CHAN_CTRL_RUN_STOP);
399-
if (ret)
400-
return ret;
401-
return ret;
396+
return regmap_write(xdev->rmap, xchan->base + XDMA_CHAN_CONTROL_W1C,
397+
CHAN_CTRL_RUN_STOP);
402398
}
403399

404400
/**

0 commit comments

Comments
 (0)