diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 50eb9aed47cc58..59be874a38b81c 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -570,6 +570,9 @@ is_downstream_to_pci_bridge(struct device *dev, struct device *bridge) { struct pci_dev *pdev, *pbridge; + if (!dev) + return false + if (!dev_is_pci(dev) || !dev_is_pci(bridge)) return false;