diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-11-19 15:48:07 +0100 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-11-19 15:48:07 +0100 |
commit | dba0a918722ee0f0ba3442575e4448c3ab622be4 (patch) | |
tree | fdb466cf09e7916135098d651b18924b2fe9ba5f /drivers/pci/pci-sysfs.c | |
parent | uwb: remove unused beacon group join/leave events (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff) | |
download | linux-dba0a918722ee0f0ba3442575e4448c3ab622be4.tar.xz linux-dba0a918722ee0f0ba3442575e4448c3ab622be4.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 110022d78689..5d72866897a8 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; start = vma->vm_pgoff; - size = pci_resource_len(pdev, resno) >> PAGE_SHIFT; + size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; if (start < size && size - start >= nr) return 1; WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", |