lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220516084139.8864-5-wanjiabing@vivo.com>
Date:   Mon, 16 May 2022 16:41:39 +0800
From:   Wan Jiabing <wanjiabing@...o.com>
To:     Vinod Koul <vkoul@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang7@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Cc:     Wan Jiabing <wanjiabing@...o.com>
Subject: [PATCH 4/4] dmaengine: xgene-dma: Remove unneeded ERROR check before clk_disable_unprepare

clk_disable_unprepare() already checks ERROR by using IS_ERR_OR_NULL.
Remove unneeded ERROR check for pdma->clk.

Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
---
 drivers/dma/xgene-dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
index 3589b4ef50b8..7f0088b09714 100644
--- a/drivers/dma/xgene-dma.c
+++ b/drivers/dma/xgene-dma.c
@@ -1769,8 +1769,7 @@ static int xgene_dma_probe(struct platform_device *pdev)
 
 err_dma_mask:
 err_clk_enable:
-	if (!IS_ERR(pdma->clk))
-		clk_disable_unprepare(pdma->clk);
+	clk_disable_unprepare(pdma->clk);
 
 	return ret;
 }
@@ -1794,8 +1793,7 @@ static int xgene_dma_remove(struct platform_device *pdev)
 		xgene_dma_delete_chan_rings(chan);
 	}
 
-	if (!IS_ERR(pdma->clk))
-		clk_disable_unprepare(pdma->clk);
+	clk_disable_unprepare(pdma->clk);
 
 	return 0;
 }
-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ