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:
8faf5e5
)
iommu: Warn once when device_group callback returns NULL
author
Joerg Roedel
<jroedel@suse.de>
Wed, 28 Jun 2017 10:52:48 +0000
(12:52 +0200)
committer
Joerg Roedel
<jroedel@suse.de>
Wed, 28 Jun 2017 11:29:46 +0000
(13:29 +0200)
This callback should never return NULL. Print a warning if
that happens so that we notice and can fix it.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/iommu.c
b/drivers/iommu/iommu.c
index de09e1e35830f7e3481af6c2b8ab19ded585a822..3f6ea160afed3bdf0e06a220b89e53c04b7ba84f 100644
(file)
--- a/
drivers/iommu/iommu.c
+++ b/
drivers/iommu/iommu.c
@@
-1010,6
+1010,9
@@
struct iommu_group *iommu_group_get_for_dev(struct device *dev)
if (ops && ops->device_group)
group = ops->device_group(dev);
+ if (WARN_ON_ONCE(group == NULL))
+ return ERR_PTR(-EINVAL);
+
if (IS_ERR(group))
return group;