From: Sebastian Ott Date: Fri, 22 Jan 2016 13:03:06 +0000 (+0100) Subject: s390/pci: fix bar check X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c0cabaddeeeab13db8ef4e275ab5c7c0e8746324;p=openwrt%2Fstaging%2Fblogic.git s390/pci: fix bar check Fix the check which bar space we should map to allow available bars only. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 53139158010d..d28d194d580c 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -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;