]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dmaengine: xilinx: xdma: remove redundant check on ret
authorColin Ian King <colin.i.king@gmail.com>
Thu, 7 Nov 2024 11:46:56 +0000 (11:46 +0000)
committerVinod Koul <vkoul@kernel.org>
Mon, 2 Dec 2024 16:56:37 +0000 (22:26 +0530)
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 <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20241107114656.17611-1-colin.i.king@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xdma.c

index 93772abc3b49f32311098c17505a5a5be78c4a2d..0d88b1a670e142dac90d09c515809faa2476a816 100644 (file)
@@ -390,15 +390,11 @@ static int xdma_xfer_start(struct xdma_chan *xchan)
  */
 static int xdma_xfer_stop(struct xdma_chan *xchan)
 {
-       int ret;
        struct xdma_device *xdev = xchan->xdev_hdl;
 
        /* clear run stop bit to prevent any further auto-triggering */
-       ret = regmap_write(xdev->rmap, xchan->base + XDMA_CHAN_CONTROL_W1C,
-                          CHAN_CTRL_RUN_STOP);
-       if (ret)
-               return ret;
-       return ret;
+       return regmap_write(xdev->rmap, xchan->base + XDMA_CHAN_CONTROL_W1C,
+                           CHAN_CTRL_RUN_STOP);
 }
 
 /**