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>
This commit is contained in:
Родитель
c506fff3d3
Коммит
c0cabaddee
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче