From 92f64f63373a948afc27b1e45d6f8681bcd135eb Mon Sep 17 00:00:00 2001 From: Daniil <82492303+daniilfigasystems@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:23:56 +0900 Subject: [PATCH] Update iommu.c --- drivers/iommu/intel/iommu.c | 3 +++ 1 file changed, 3 insertions(+) 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;