lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] dmaengine: ep93xx_dma: Remove unneeded ERROR check before clk_put
Date
clk_put() already uses !clk and IS_ERR(clk) to check ERROR or NULL.
Remove unneeded ERROR or NULL check for edmac->clk.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
drivers/dma/ep93xx_dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 971ff5f9ae84..60dc7b3f3d0d 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -1398,8 +1398,7 @@ static int __init ep93xx_dma_probe(struct platform_device *pdev)
if (unlikely(ret)) {
for (i = 0; i < edma->num_channels; i++) {
struct ep93xx_dma_chan *edmac = &edma->channels[i];
- if (!IS_ERR_OR_NULL(edmac->clk))
- clk_put(edmac->clk);
+ clk_put(edmac->clk);
}
kfree(edma);
} else {
--
2.36.1
\
 
 \ /
  Last update: 2022-05-16 10:43    [W:2.016 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site