mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] USB ulpi: pass return value
@ 2012-12-03 19:09 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2012-12-03 19:09 UTC (permalink / raw)
  To: barebox

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-03 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03 19:09 [PATCH] USB ulpi: pass return value Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox