projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62280cf
)
iommu/amd: Missing error code in amd_iommu_init_device()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 24 Nov 2016 11:05:44 +0000
(14:05 +0300)
committer
Joerg Roedel
<jroedel@suse.de>
Tue, 29 Nov 2016 16:39:44 +0000
(17:39 +0100)
We should set "ret" to -EINVAL if iommu_group_get() fails.
Fixes:
55c99a4dc50f
("iommu/amd: Use iommu_attach_group()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_v2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/amd_iommu_v2.c
b/drivers/iommu/amd_iommu_v2.c
index 594849a3a9be63a8ada2662bd19040d1280fcab6..f8ed8c95b68537820c92be07df1bf9e28c19db32 100644
(file)
--- a/
drivers/iommu/amd_iommu_v2.c
+++ b/
drivers/iommu/amd_iommu_v2.c
@@
-805,8
+805,10
@@
int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
goto out_free_domain;
group = iommu_group_get(&pdev->dev);
- if (!group)
+ if (!group) {
+ ret = -EINVAL;
goto out_free_domain;
+ }
ret = iommu_attach_group(dev_state->domain, group);
if (ret != 0)