2012-10-19 14:30:14

by Ben Collins

[permalink] [raw]
Subject: [PATCH] USB: ehci-fsl: Return valid error in ehci_fsl_setup_phy

ehci_fsl_setup_phy is supposed to return an int, but had a void return
value in the case of controller_ver being invalid.

Signed-off-by: Ben Collins <[email protected]>
Cc: Shengzhou Liu <[email protected]>
---
drivers/usb/host/ehci-fsl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 9bfde82..0d2f35c 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -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]);
--
1.7.10.4