Commit e8e25a77 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

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: default avatarSebastian Ott <sebott@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent a0308c13
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;