diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-20 18:49:32 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-20 18:49:32 -1000 |
| commit | c60b689631d73be046ecbe9fc3248252ba18b41f (patch) | |
| tree | 3c992199e7320151394616e9da9ea3dfcb8bc0df /drivers/iommu/intel-iommu.c | |
| parent | ca6215dfc7d09809b97f2d6af0535d7836cbb966 (diff) | |
| parent | 3da4af0affbb797e8ac4c2b4598da0c34b8cc52a (diff) | |
Merge tag 'iommu-fixes-v3.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU fixes from Joerg Roedel:
"Some fixes and a MAINTAINERS update to remove my lost AMD email
address from the file. The fixes take care of a resource leak and a
problem on VT-d with the new IOMMU group code."
* tag 'iommu-fixes-v3.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
intel-iommu: Fix lookup in add device
iommu/tegra-smmu.c: fix dentry reference leak in smmu_debugfs_stats_show().
iommu/amd: Update MAINTAINERS entry
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d4a4cd445ca..0badfa48b32 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -4108,7 +4108,7 @@ static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to) static int intel_iommu_add_device(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); - struct pci_dev *bridge, *dma_pdev; + struct pci_dev *bridge, *dma_pdev = NULL; struct iommu_group *group; int ret; @@ -4122,7 +4122,7 @@ static int intel_iommu_add_device(struct device *dev) dma_pdev = pci_get_domain_bus_and_slot( pci_domain_nr(pdev->bus), bridge->subordinate->number, 0); - else + if (!dma_pdev) dma_pdev = pci_dev_get(bridge); } else dma_pdev = pci_dev_get(pdev); |
