PCI: Correct PCI_STD_RESOURCE_END usage
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 19 May 2017 19:40:50 +0000 (14:40 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 12 Oct 2017 14:27:10 +0000 (15:27 +0100)
commitbf97987fb94cc7d90154a217a3464d46efb8ee69
tree277b5b1bc38bf7db8fb7cf00d0721030487b9053
parent1bddbbc4697f96a3b68633621e5c13d9e173f263
PCI: Correct PCI_STD_RESOURCE_END usage

commit 2f686f1d9beee135de6d08caea707ec7bfc916d4 upstream.

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: 9fe373f9997b ("PCI: Increase IBM ipr SAS Crocodile BARs to at least system page size")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pci/quirks.c