summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ext-caps.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-02-18 09:03:57 +0100
committerIngo Molnar <mingo@kernel.org>2016-02-18 09:03:57 +0100
commit061f817eb6a6f97a7e34b73e5e80baa3a20b7663 (patch)
tree412332269985de14d5e1ae9eedbfcd73bc635e97 /drivers/usb/host/xhci-ext-caps.h
parentx86/mce/AMD: Set MCAX Enable bit (diff)
parentLinux 4.5-rc4 (diff)
downloadlinux-061f817eb6a6f97a7e34b73e5e80baa3a20b7663.tar.xz
linux-061f817eb6a6f97a7e34b73e5e80baa3a20b7663.zip
Merge tag 'v4.5-rc4' into ras/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/usb/host/xhci-ext-caps.h')
-rw-r--r--drivers/usb/host/xhci-ext-caps.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ext-caps.h b/drivers/usb/host/xhci-ext-caps.h
index 04ce6b156b35..e0244fb3903d 100644
--- a/drivers/usb/host/xhci-ext-caps.h
+++ b/drivers/usb/host/xhci-ext-caps.h
@@ -112,12 +112,16 @@ static inline int xhci_find_next_ext_cap(void __iomem *base, u32 start, int id)
offset = start;
if (!start || start == XHCI_HCC_PARAMS_OFFSET) {
val = readl(base + XHCI_HCC_PARAMS_OFFSET);
+ if (val == ~0)
+ return 0;
offset = XHCI_HCC_EXT_CAPS(val) << 2;
if (!offset)
return 0;
};
do {
val = readl(base + offset);
+ if (val == ~0)
+ return 0;
if (XHCI_EXT_CAPS_ID(val) == id && offset != start)
return offset;