diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 388440e0d222..d5cdccf27a69 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -620,6 +620,9 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, | |||
620 | vma->vm_pgoff += start >> PAGE_SHIFT; | 620 | vma->vm_pgoff += start >> PAGE_SHIFT; |
621 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; | 621 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; |
622 | 622 | ||
623 | if (res->flags & IORESOURCE_MEM && iomem_is_exclusive(start)) | ||
624 | return -EINVAL; | ||
625 | |||
623 | return pci_mmap_page_range(pdev, vma, mmap_type, write_combine); | 626 | return pci_mmap_page_range(pdev, vma, mmap_type, write_combine); |
624 | } | 627 | } |
625 | 628 | ||