iommu/vt-d: returning free pointer in get_domain_for_dev()
Subsystems (2)
PATCH 1/1 iommu/vt-d: returning free pointer in get_domain_for_dev()
If we hit this error condition then we want to return a NULL pointer and not a freed variable.
Signed-off-by Dan Carpenter <[email protected]>
drivers/iommu/intel-iommu.c +1 -0
@@ -2257,6 +2257,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) goto error;if (iommu_attach_domain (domain, iommu)) {free_domain_mem (domain); + domain =NULL ; goto error; } free = domain;
David Woodhouse
AppliedQuoted 10 lines · Dan Carpenter
If we hit this error condition then we want to return a NULL pointer and not a freed variable.
Signed-off-by Dan Carpenter <[email protected]>drivers/iommu/intel-iommu.c +0
-0
drivers/iommu/intel-iommu.c static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) · line 2263
Quoted 7 lines
drivers/iommu/intel-iommu.c +1
-0@@ -2257,6 +2257,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw) goto error;if (iommu_attach_domain (domain, iommu)) {free_domain_mem (domain); + domain =NULL ; goto error; } free = domain;
Applied; thanks.
Signature · 2 lines
David Woodhouse Open Source Technology Centre [email protected] Intel Corporation