diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-10 23:23:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-10 23:23:03 +0300 |
commit | 4850d37d3a7c049f7dc3eb09d7ae4e5553ac521b (patch) | |
tree | ce7ace12d6a876ec67e248b3a4db431242c8bb82 | |
parent | aff8ad59fee4b79f2986b1bccb942bed94fd43fa (diff) | |
parent | 7c2e211f3c95b91912a92a8c6736343690042e2e (diff) | |
download | linux-4850d37d3a7c049f7dc3eb09d7ae4e5553ac521b.tar.xz |
Merge tag 'vfio-v3.19-rc4' of git://github.com/awilliam/linux-vfio
Pull VFIO fix from Alex Williamson:
"Fix PCI header check in vfio_pci_probe() (Wei Yang)"
* tag 'vfio-v3.19-rc4' of git://github.com/awilliam/linux-vfio:
vfio-pci: Fix the check on pci device type in vfio_pci_probe()
-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 = { static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { - u8 type; struct vfio_pci_device *vdev; struct iommu_group *group; int ret; - pci_read_config_byte(pdev, PCI_HEADER_TYPE, &type); - if ((type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) + if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) return -EINVAL; group = iommu_group_get(&pdev->dev); |