linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] iommu: msm_iommu: Delete useless kfree code
@ 2020-12-14 13:47 Zheng Yongjun
  2020-12-14 16:21 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-14 13:47 UTC (permalink / raw)
  To: agross, bjorn.andersson, joro, will, linux-arm-msm, iommu, linux-kernel
  Cc: Zheng Yongjun

The parameter of kfree function is NULL, so kfree code is useless, delete it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/iommu/msm_iommu.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 3615cd6241c4..1286674a1322 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -319,7 +319,7 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type)
 
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
 	if (!priv)
-		goto fail_nomem;
+		return NULL;
 
 	INIT_LIST_HEAD(&priv->list_attached);
 
@@ -328,10 +328,6 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type)
 	priv->domain.geometry.force_aperture = true;
 
 	return &priv->domain;
-
-fail_nomem:
-	kfree(priv);
-	return NULL;
 }
 
 static void msm_iommu_domain_free(struct iommu_domain *domain)
-- 
2.22.0


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

end of thread, other threads:[~2020-12-14 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 13:47 [PATCH -next] iommu: msm_iommu: Delete useless kfree code Zheng Yongjun
2020-12-14 16:21 ` Bjorn Andersson

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).