diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index fa0cf1c3775d..751ff91af0ff 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4241,8 +4241,10 @@ static inline bool has_external_pci(void) struct pci_dev *pdev = NULL; for_each_pci_dev(pdev) - if (pdev->external_facing) + if (pdev->external_facing) { + pci_dev_put(pdev); return true; + } return false; }