mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +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
a18904023b
commit
ee886e22c6
|
|
@ -2196,7 +2196,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