summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-ext-caps.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-02-29 08:42:07 (GMT)
committerIngo Molnar <mingo@kernel.org>2016-02-29 08:42:07 (GMT)
commit6aa447bcbb444cd1b738613a20627f288d631665 (patch)
tree62030bb14be0006248181305ac1fe377a99e5b65 /drivers/usb/host/xhci-ext-caps.h
parentabedf8e2419fb873d919dd74de2e84b510259339 (diff)
parent48be3a67da7413d62e5efbcf2c73a9dddf61fb96 (diff)
downloadlinux-6aa447bcbb444cd1b738613a20627f288d631665.tar.xz
Merge branch 'sched/urgent' into sched/core, to pick up fixes before applying new changes
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 04ce6b1..e0244fb 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;