All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu: Remove unneeded NULL check in sprd-iommu
@ 2022-05-13  8:41 ` Wan Jiabing via iommu
  0 siblings, 0 replies; 2+ messages in thread
From: Wan Jiabing @ 2022-05-13  8:41 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Orson Zhai, Baolin Wang,
	Chunyan Zhang, iommu, linux-kernel
  Cc: Wan Jiabing

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


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

* [PATCH] iommu: Remove unneeded NULL check in sprd-iommu
@ 2022-05-13  8:41 ` Wan Jiabing via iommu
  0 siblings, 0 replies; 2+ messages in thread
From: Wan Jiabing via iommu @ 2022-05-13  8:41 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Orson Zhai, Baolin Wang,
	Chunyan Zhang, iommu, linux-kernel
  Cc: Wan Jiabing

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

_______________________________________________
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:42 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:41 [PATCH] iommu: Remove unneeded NULL check in sprd-iommu Wan Jiabing
2022-05-13  8:41 ` 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.