mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
a0308c1315
commit
e8e25a7718
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue