mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
iommu: Warn once when device_group callback returns NULL
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>
This commit is contained in:
parent
8faf5e5a12
commit
72dcac6334
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue