/home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c: In 
function ‘handle_port_status’:
/home/b29397/work/code/git/linus/linux-2.6/drivers/usb/host/xhci-ring.c:1580: 
warning: ‘hcd’ may be used uninitialized in this function

Signed-off-by: Peter Chen <peter.c...@freescale.com>
---
 drivers/usb/host/xhci-ring.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 8828754..17dace0 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1588,6 +1588,8 @@ static void handle_port_status(struct xhci_hcd *xhci,
        __le32 __iomem **port_array;
        bool bogus_port_status = false;
 
+       /* Find the right roothub. */
+       hcd = xhci_to_hcd(xhci);
        /* Port status change events always have a successful completion code */
        if (GET_COMP_CODE(le32_to_cpu(event->generic.field[2])) != 
COMP_SUCCESS) {
                xhci_warn(xhci, "WARN: xHC returned failed port status 
event\n");
@@ -1629,8 +1631,6 @@ static void handle_port_status(struct xhci_hcd *xhci,
         * into the index into the ports on the correct split roothub, and the
         * correct bus_state structure.
         */
-       /* Find the right roothub. */
-       hcd = xhci_to_hcd(xhci);
        if ((major_revision == 0x03) != (hcd->speed == HCD_USB3))
                hcd = xhci->shared_hcd;
        bus_state = &xhci->bus_state[hcd_index(hcd)];
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to