提交 92a16c86 编写于 作者: B Bjorn Helgaas

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: 55d728a4 ("efi/fb: Avoid reconfiguration of BAR that covers the framebuffer")
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 7ee214b5
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册