diff options
author | Sebastian Ott <sebott@linux.ibm.com> | 2018-07-31 09:59:09 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-02-07 11:57:04 +0100 |
commit | e8e25a7718cf64701ddf7f7b2e31c79815b613f1 (patch) | |
tree | 4e1926129005ff10ced108712525611fbd1fc12e /arch | |
parent | a0308c1315e72b6fdce7b419c4546dad568b3a83 (diff) | |
download | linux-e8e25a7718cf64701ddf7f7b2e31c79815b613f1.tar.bz2 |
s390/pci: improve bar check
Improve the bar check in pci_iomap_range to cover functions
for which we recognize more bars than what we can access due
to AR restrictions.
Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-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 a966d7bfac57..353161c2e309 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -285,7 +285,7 @@ void __iomem *pci_iomap_range(struct pci_dev *pdev, struct zpci_dev *zdev = to_zpci(pdev); int idx; - if (!pci_resource_len(pdev, bar)) + if (!pci_resource_len(pdev, bar) || bar >= PCI_BAR_COUNT) return NULL; idx = zdev->bars[bar].map_idx; |