[PATCH] USB ulpi: pass return value

Sascha Hauer s.hauer at pengutronix.de
Mon Dec 3 14:09:22 EST 2012


Pass the return value from ulpi_probe in ulpi_setup instead
of returning -1 (which is -EPERM and does not make sense in
this context)

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/usb/otg/ulpi.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index d749280..61cbada 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -181,8 +181,11 @@ int ulpi_set_vbus(void __iomem *view, int on)
 
 int ulpi_setup(void __iomem *view, int on)
 {
-	if (ulpi_probe(view))
-		return -1;
+	int ret;
+
+	ret = ulpi_probe(view);
+	if (ret)
+		return ret;
 
 	return ulpi_set_vbus(view, on);
 }
-- 
1.7.10.4




More information about the barebox mailing list