diff options
Diffstat (limited to 'drivers/vfio/pci/vfio_pci.c')
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 255201f22126..7cc0122a18ce 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c | |||
@@ -840,13 +840,11 @@ static const struct vfio_device_ops vfio_pci_ops = { | |||
840 | 840 | ||
841 | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 841 | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
842 | { | 842 | { |
843 | u8 type; | ||
844 | struct vfio_pci_device *vdev; | 843 | struct vfio_pci_device *vdev; |
845 | struct iommu_group *group; | 844 | struct iommu_group *group; |
846 | int ret; | 845 | int ret; |
847 | 846 | ||
848 | pci_read_config_byte(pdev, PCI_HEADER_TYPE, &type); | 847 | if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) |
849 | if ((type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) | ||
850 | return -EINVAL; | 848 | return -EINVAL; |
851 | 849 | ||
852 | group = iommu_group_get(&pdev->dev); | 850 | group = iommu_group_get(&pdev->dev); |