[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220513084226.129437-1-wanjiabing@vivo.com>
Date: Fri, 13 May 2022 16:42:26 +0800
From: Wan Jiabing <wanjiabing@...o.com>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
linux-arm-msm@...r.kernel.org, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Cc: Wan Jiabing <wanjiabing@...o.com>
Subject: [PATCH] iommu: Remove unneeded NULL check in msm_iommu
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@...o.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
Powered by blists - more mailing lists