diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2016-01-22 14:03:06 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-01-26 12:46:17 +0100 |
commit | c0cabaddeeeab13db8ef4e275ab5c7c0e8746324 (patch) | |
tree | 2d15deb1740906ec71672ec28bb74b4e34e7404e /arch/s390/pci/pci.c | |
parent | c506fff3d3a8a632e8eb2270680548ec415f0357 (diff) |
s390/pci: fix bar check
Fix the check which bar space we should map to allow available bars only.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r-- | arch/s390/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 53139158010d..d28d194d580c 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -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; |