diff options
| author | Will Deacon <will@kernel.org> | 2020-12-08 15:21:49 +0000 | 
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2020-12-08 15:21:49 +0000 | 
| commit | c74009f5290d6679ecb865b5d795508df7ad599f (patch) | |
| tree | 1c619442a83c776eddbb1cb4b722d8822cf670ec /drivers/iommu/iommu.c | |
| parent | 113eb4ce4fc33ef3deda1431497811d43342c0cc (diff) | |
| parent | 4165bf015ba9454f45beaad621d16c516d5c5afe (diff) | |
Merge branch 'for-next/iommu/fixes' into for-next/iommu/core
Merge in IOMMU fixes for 5.10 in order to resolve conflicts against the
queue for 5.11.
* for-next/iommu/fixes:
  iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs
  iommu/vt-d: Don't read VCCAP register unless it exists
  x86/tboot: Don't disable swiotlb when iommu is forced on
  iommu: Check return of __iommu_attach_device()
  arm-smmu-qcom: Ensure the qcom_scm driver has finished probing
  iommu/amd: Enforce 4k mapping for certain IOMMU data structures
  MAINTAINERS: Temporarily add myself to the IOMMU entry
  iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set
  iommu/vt-d: Avoid panic if iommu init fails in tboot system
  iommu/vt-d: Cure VF irqdomain hickup
  x86/platform/uv: Fix copied UV5 output archtype
  x86/platform/uv: Drop last traces of uv_flush_tlb_others
Diffstat (limited to 'drivers/iommu/iommu.c')
| -rw-r--r-- | drivers/iommu/iommu.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index a606b7aef96b..ffeebda8d6de 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -268,16 +268,18 @@ int iommu_probe_device(struct device *dev)  	 */  	iommu_alloc_default_domain(group, dev); -	if (group->default_domain) +	if (group->default_domain) {  		ret = __iommu_attach_device(group->default_domain, dev); +		if (ret) { +			iommu_group_put(group); +			goto err_release; +		} +	}  	iommu_create_device_direct_mappings(group, dev);  	iommu_group_put(group); -	if (ret) -		goto err_release; -  	if (ops->probe_finalize)  		ops->probe_finalize(dev); | 
