lkml.org 
[lkml]   [2022]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iommu: Remove unneeded NULL check in sprd-iommu
Date
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@vivo.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
\
 
 \ /
  Last update: 2022-05-13 10:43    [W:0.031 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site