public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] dmaengine: xilinx: xdma: remove redundant check on ret
@ 2024-11-07 11:46 Colin Ian King
  2024-12-02 17:31 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-11-07 11:46 UTC (permalink / raw)
  To: Lizhi Hou, Brian Xu, Raj Kumar Rampelli, Vinod Koul, Michal Simek,
	dmaengine, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

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>
---
 drivers/dma/xilinx/xdma.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 93772abc3b49..0d88b1a670e1 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -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);
 }
 
 /**
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] dmaengine: xilinx: xdma: remove redundant check on ret
  2024-11-07 11:46 [PATCH][next] dmaengine: xilinx: xdma: remove redundant check on ret Colin Ian King
@ 2024-12-02 17:31 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2024-12-02 17:31 UTC (permalink / raw)
  To: Lizhi Hou, Brian Xu, Raj Kumar Rampelli, Michal Simek, dmaengine,
	linux-arm-kernel, Colin Ian King
  Cc: kernel-janitors, linux-kernel


On Thu, 07 Nov 2024 11:46:56 +0000, Colin Ian King wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] dmaengine: xilinx: xdma: remove redundant check on ret
      commit: 0f31c0912286f84b34b15e39b286db8f4765ced8

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-02 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 11:46 [PATCH][next] dmaengine: xilinx: xdma: remove redundant check on ret Colin Ian King
2024-12-02 17:31 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox