From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] USB ulpi: pass return value
Date: Mon, 3 Dec 2012 20:09:22 +0100 [thread overview]
Message-ID: <1354561762-4355-1-git-send-email-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2012-12-03 19:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354561762-4355-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox