diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-03-28 11:29:50 +0300 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2014-03-28 11:31:39 +0000 |
commit | 14d405699634d4ce0adfc7b4f52ac7427220a98d (patch) | |
tree | 56eacf795870fa5c4e9d868c68da30dc173ef951 /drivers/iommu | |
parent | 63b4262478ee6384c7efb5279be54236e5d6361b (diff) | |
download | op-kernel-dev-14d405699634d4ce0adfc7b4f52ac7427220a98d.zip op-kernel-dev-14d405699634d4ce0adfc7b4f52ac7427220a98d.tar.gz |
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 <dan.carpenter@oracle.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 6fbce01..69fa7da 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -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; |