Message ID | 20210726214345.GA645499@bjorn-Precision-5520 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [helgaas@kernel.org:,Re:,aarch64,efi,boot,failures,with,qemu,6.0+] | expand |
diff --git a/lib/pci_iomap.c b/lib/pci_iomap.c index 2d3eb1cb73b8..77455e702a3e 100644 --- a/lib/pci_iomap.c +++ b/lib/pci_iomap.c @@ -34,7 +34,9 @@ void __iomem *pci_iomap_range(struct pci_dev *dev, resource_size_t len = pci_resource_len(dev, bar); unsigned long flags = pci_resource_flags(dev, bar); - if (len <= offset || !start) + if (flags & IORESOURCE_MEM && !start) + return NULL; + if (len <= offset) return NULL; len -= offset; start += offset;