Move source tree closer to the 2.6.32.17 mainline
/drivers/usb/host/xhci-ext-caps.h
blob:ecc131c3fe337a68788054dfc2dc695503b30a77 -> blob:78c4edac1db14cf324cd90a039467d22f90ae53f
--- drivers/usb/host/xhci-ext-caps.h
+++ drivers/usb/host/xhci-ext-caps.h
@@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_off
next = readl(base + ext_offset);
- if (ext_offset == XHCI_HCC_PARAMS_OFFSET)
+ if (ext_offset == XHCI_HCC_PARAMS_OFFSET) {
/* Find the first extended capability */
next = XHCI_HCC_EXT_CAPS(next);
- else
+ ext_offset = 0;
+ } else {
/* Find the next extended capability */
next = XHCI_EXT_CAPS_NEXT(next);
+ }
+
if (!next)
return 0;
/*