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>] [day] [month] [year] [list]
Date:   Fri, 13 May 2022 16:41:42 +0800
From:   Wan Jiabing <wanjiabing@...o.com>
To:     Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang7@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Cc:     Wan Jiabing <wanjiabing@...o.com>
Subject: [PATCH] iommu: Remove unneeded NULL check in sprd-iommu

clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for sdev->eb here.

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

diff --git a/drivers/iommu/sprd-iommu.c b/drivers/iommu/sprd-iommu.c
index bd409bab6286..7c2bd6fda165 100644
--- a/drivers/iommu/sprd-iommu.c
+++ b/drivers/iommu/sprd-iommu.c
@@ -462,8 +462,7 @@ static int sprd_iommu_clk_enable(struct sprd_iommu_device *sdev)
 
 static void sprd_iommu_clk_disable(struct sprd_iommu_device *sdev)
 {
-	if (sdev->eb)
-		clk_disable_unprepare(sdev->eb);
+	clk_disable_unprepare(sdev->eb);
 }
 
 static int sprd_iommu_probe(struct platform_device *pdev)
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ