linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops()
@ 2025-04-22  7:25 Chen Ni
  2025-04-28 11:11 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-04-22  7:25 UTC (permalink / raw)
  To: sven, j, alyssa, neal, joro, will, robin.murphy
  Cc: asahi, linux-arm-kernel, iommu, linux-kernel, Chen Ni

free_io_pgtable_ops() checks for NULL pointers internally.
Remove unneeded NULL check here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/iommu/apple-dart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index e13501541fdd..757d24f67ad4 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -776,8 +776,7 @@ static void apple_dart_domain_free(struct iommu_domain *domain)
 {
 	struct apple_dart_domain *dart_domain = to_dart_domain(domain);
 
-	if (dart_domain->pgtbl_ops)
-		free_io_pgtable_ops(dart_domain->pgtbl_ops);
+	free_io_pgtable_ops(dart_domain->pgtbl_ops);
 
 	kfree(dart_domain);
 }
-- 
2.25.1



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

* Re: [PATCH] iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops()
  2025-04-22  7:25 [PATCH] iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops() Chen Ni
@ 2025-04-28 11:11 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2025-04-28 11:11 UTC (permalink / raw)
  To: Chen Ni
  Cc: sven, j, alyssa, neal, will, robin.murphy, asahi,
	linux-arm-kernel, iommu, linux-kernel

On Tue, Apr 22, 2025 at 03:25:11PM +0800, Chen Ni wrote:
> free_io_pgtable_ops() checks for NULL pointers internally.
> Remove unneeded NULL check here.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/iommu/apple-dart.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.



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

end of thread, other threads:[~2025-04-28 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22  7:25 [PATCH] iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops() Chen Ni
2025-04-28 11:11 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).