[PATCH] powerpc/usb: fix build warning

Kim Phillips kim.phillips at freescale.com
Tue Oct 9 08:47:31 EST 2012


commit 3735ba8db8e6ea22ad3ff524328926d8d780a884 "powerpc/usb: fix bug of
CPU hang when missing USB PHY clock" introduced a new build warning:

In file included from linux/drivers/usb/host/ehci-hcd.c:1208:0:
linux/drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
linux/drivers/usb/host/ehci-fsl.c:225:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]

this fixes it.

Cc: Shengzhou Liu <Shengzhou.Liu at freescale.com>
Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
---
 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..968f751 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 -EINVAL;
 	}
 
 	portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);
-- 
1.7.12.2




More information about the Linuxppc-dev mailing list