Commit 40034207 authored by Sebastian Ott's avatar Sebastian Ott Committed by Tim Gardner

s390/pci: fix bar check

BugLink: http://bugs.launchpad.net/bugs/1558624

Fix the check which bar space we should map to allow available bars only.
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
(cherry picked from commit c0cabadd)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent d49d292a
......@@ -270,7 +270,7 @@ void __iomem *pci_iomap_range(struct pci_dev *pdev,
struct zpci_dev *zdev = to_zpci(pdev);
int idx;
if ((bar & 7) != bar)
if (!pci_resource_len(pdev, bar))
return NULL;
idx = zdev->bars[bar].map_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment