iommu: msm_iommu: Delete useless kfree code
Subsystems (3)
PATCH 1/1 iommu: msm_iommu: Delete useless kfree code
The parameter of kfree function is NULL, so kfree code is useless, delete it.
Signed-off-by Zheng Yongjun <[email protected]>
--- drivers/iommu/msm_iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/iommu/msm_iommu.c +1 -5
@@ -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)
Signature · 1 line
2.22.0
Quoted 3 lines · Zheng Yongjun
The parameter of kfree function is NULL, so kfree code is useless, delete it.
Signed-off-by Zheng Yongjun <[email protected]>
Reviewed-by Bjorn Andersson <[email protected]>
Regards,
Bjorn
Quoted 31 lines
--- drivers/iommu/msm_iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/iommu/msm_iommu.c +1
-5@@ -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)Signature · 1 line
2.22.0
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu