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 msm_iommu
Date
clk_disable() already uses IS_ERR_OR_NULL to check NULL pointer.
Remove unneeded NULL check for iommu->clk here.

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

diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index f09aedfdd462..c3ec2b7d33a5 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -70,8 +70,7 @@ static int __enable_clocks(struct msm_iommu_dev *iommu)

static void __disable_clocks(struct msm_iommu_dev *iommu)
{
- if (iommu->clk)
- clk_disable(iommu->clk);
+ clk_disable(iommu->clk);
clk_disable(iommu->pclk);
}

--
2.35.1
\
 
 \ /
  Last update: 2022-05-13 10:44    [W:0.024 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site