summaryrefslogtreecommitdiffstats
path: root/src/device/pciexp_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/pciexp_device.c')
-rw-r--r--src/device/pciexp_device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/pciexp_device.c b/src/device/pciexp_device.c
index c03c224003d6..ac4e668f08a3 100644
--- a/src/device/pciexp_device.c
+++ b/src/device/pciexp_device.c
@@ -15,6 +15,9 @@ static unsigned int pciexp_get_ext_cap_offset(const struct device *dev, unsigned
unsigned int next_cap_offset, this_cap, cafe;
do {
this_cap = pci_read_config32(dev, this_cap_offset);
+ /* Bail out when this request is unsupported */
+ if (this_cap == 0xffffffff)
+ break;
cafe = pci_read_config32(dev, this_cap_offset + 4);
if ((this_cap & 0xffff) == cap) {
return this_cap_offset;