mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
iommu: don't break detach if iommu shared by more than one master
Change-Id: I4fade6e770e124dcaca41d122965e8696f268556 Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
parent
c6e7c35ce4
commit
56a06f65ac
|
|
@ -1404,7 +1404,8 @@ void iommu_detach_device(struct iommu_domain *domain, struct device *dev)
|
|||
return;
|
||||
|
||||
mutex_lock(&group->mutex);
|
||||
if (iommu_group_device_count(group) != 1) {
|
||||
/* Don't break detach if iommu shared by more than one master */
|
||||
if (iommu_group_device_count(group) < 1) {
|
||||
WARN_ON(1);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user