diff options
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 d4a4cd445cab..0badfa48b32b 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) | |||
4108 | static int intel_iommu_add_device(struct device *dev) | 4108 | static int intel_iommu_add_device(struct device *dev) |
4109 | { | 4109 | { |
4110 | struct pci_dev *pdev = to_pci_dev(dev); | 4110 | struct pci_dev *pdev = to_pci_dev(dev); |
4111 | struct pci_dev *bridge, *dma_pdev; | 4111 | struct pci_dev *bridge, *dma_pdev = NULL; |
4112 | struct iommu_group *group; | 4112 | struct iommu_group *group; |
4113 | int ret; | 4113 | int ret; |
4114 | 4114 | ||
@@ -4122,7 +4122,7 @@ static int intel_iommu_add_device(struct device *dev) | |||
4122 | dma_pdev = pci_get_domain_bus_and_slot( | 4122 | dma_pdev = pci_get_domain_bus_and_slot( |
4123 | pci_domain_nr(pdev->bus), | 4123 | pci_domain_nr(pdev->bus), |
4124 | bridge->subordinate->number, 0); | 4124 | bridge->subordinate->number, 0); |
4125 | else | 4125 | if (!dma_pdev) |
4126 | dma_pdev = pci_dev_get(bridge); | 4126 | dma_pdev = pci_dev_get(bridge); |
4127 | } else | 4127 | } else |
4128 | dma_pdev = pci_dev_get(pdev); | 4128 | dma_pdev = pci_dev_get(pdev); |