提交 c0cabadd 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

s390/pci: fix bar check

Fix the check which bar space we should map to allow available bars only.
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 c506fff3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册