Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Colin Ian King and committed by
Vinod Koul
0f31c091 bf9b0834

+2 -6
+2 -6
drivers/dma/xilinx/xdma.c
··· 390 390 */ 391 391 static int xdma_xfer_stop(struct xdma_chan *xchan) 392 392 { 393 - int ret; 394 393 struct xdma_device *xdev = xchan->xdev_hdl; 395 394 396 395 /* 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); 402 398 } 403 399 404 400 /**