Skip to contentSkip to conversation

iommu: Remove unneeded NULL check in sprd-iommu

PATCH New Wan Jiabing 1 participant 1 message May 13, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/iommu/sprd-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/sprd-iommu.c +1 -2
index bd409bab6286..7c2bd6fda165 100644
@@ -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)
Signature · 1 line
2.35.1