|
@@ -916,7 +916,7 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
|
|
* which we used for the IOMMU lookup. Strictly speaking
|
|
* which we used for the IOMMU lookup. Strictly speaking
|
|
* we could do this for all PCI devices; we only need to
|
|
* we could do this for all PCI devices; we only need to
|
|
* get the BDF# from the scope table for ACPI matches. */
|
|
* get the BDF# from the scope table for ACPI matches. */
|
|
- if (pdev->is_virtfn)
|
|
|
|
|
|
+ if (pdev && pdev->is_virtfn)
|
|
goto got_pdev;
|
|
goto got_pdev;
|
|
|
|
|
|
*bus = drhd->devices[i].bus;
|
|
*bus = drhd->devices[i].bus;
|