summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-05-19 22:37:53 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-06-13 19:44:23 +0300
commit92a16c86299c64f58f320e491977408ba31b8c3c (patch)
tree4e2596abb203ffca047fb1b6f0258edfdc56a46b /drivers/video
parent7ee214b540d9453af297cd19c43002018ed73fea (diff)
downloadlinux-92a16c86299c64f58f320e491977408ba31b8c3c.tar.xz
efi/fb: Correct PCI_STD_RESOURCE_END usage
PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not the *number* of BARs. To iterate through all possible BARs, we need to include PCI_STD_RESOURCE_END. Fixes: 55d728a40d36 ("efi/fb: Avoid reconfiguration of BAR that covers the framebuffer") Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/efifb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index b827a8113e26..ff01bed7112f 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -408,7 +408,7 @@ static void efifb_fixup_resources(struct pci_dev *dev)
if (!base)
return;
- for (i = 0; i < PCI_STD_RESOURCE_END; i++) {
+ for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
struct resource *res = &dev->resource[i];
if (!(res->flags & IORESOURCE_MEM))