All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu: Remove unneeded NULL check in msm_iommu
@ 2022-05-13  8:42 ` Wan Jiabing via iommu
  0 siblings, 0 replies; 2+ messages in thread
From: Wan Jiabing @ 2022-05-13  8:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Joerg Roedel, Will Deacon,
	linux-arm-msm, iommu, linux-kernel
  Cc: Wan Jiabing

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] iommu: Remove unneeded NULL check in msm_iommu
@ 2022-05-13  8:42 ` Wan Jiabing via iommu
  0 siblings, 0 replies; 2+ messages in thread
From: Wan Jiabing via iommu @ 2022-05-13  8:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Joerg Roedel, Will Deacon,
	linux-arm-msm, iommu, linux-kernel
  Cc: Wan Jiabing

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

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-13  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13  8:42 [PATCH] iommu: Remove unneeded NULL check in msm_iommu Wan Jiabing
2022-05-13  8:42 ` Wan Jiabing via iommu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.