From 4e9e147f78c2f03daabcfb7870b61665f8329f59 Mon Sep 17 00:00:00 2001 From: Edward Shao Date: Thu, 11 Feb 2010 03:37:30 +0800 Subject: [PATCH] --- yaml --- r: 185402 b: refs/heads/master c: 05197921ff3dad52d99fd1647974c57d9c28d40e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci-ext-caps.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b352da2eeab1..386bfbc2177b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cceffe9348f93188d7811bda95924d4bd3040d0f +refs/heads/master: 05197921ff3dad52d99fd1647974c57d9c28d40e diff --git a/trunk/drivers/usb/host/xhci-ext-caps.h b/trunk/drivers/usb/host/xhci-ext-caps.h index ecc131c3fe33..78c4edac1db1 100644 --- a/trunk/drivers/usb/host/xhci-ext-caps.h +++ b/trunk/drivers/usb/host/xhci-ext-caps.h @@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_offset(void __iomem *base, int ext_offset) 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; /*