USB: ehci-fsl: Return valid error in ehci_fsl_setup_phy
authorBen Collins <ben.c@servergy.com>
Fri, 19 Oct 2012 14:24:12 +0000 (10:24 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Oct 2012 17:54:30 +0000 (10:54 -0700)
ehci_fsl_setup_phy is supposed to return an int, but had a void return
value in the case of controller_ver being invalid.

Introduced by commit 3735ba8db8e6 ("powerpc/usb: fix bug of CPU hang
when missing USB PHY clock"), which missed one return.

Signed-off-by: Ben Collins <ben.c@servergy.com>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/host/ehci-fsl.c

index 9bfde82..0d2f35c 100644 (file)
@@ -222,7 +222,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
 
        if (pdata->controller_ver < 0) {
                dev_warn(hcd->self.controller, "Could not get controller version\n");
-               return;
+               return -ENODEV;
        }
 
        portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);