projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63b4262
)
iommu/vt-d: returning free pointer in get_domain_for_dev()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 28 Mar 2014 08:29:50 +0000
(11:29 +0300)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Fri, 28 Mar 2014 11:31:39 +0000
(11:31 +0000)
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>
drivers/iommu/intel-iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/intel-iommu.c
b/drivers/iommu/intel-iommu.c
index
6fbce01
..
69fa7da
100644
(file)
--- 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;