From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive
Date: Wed, 11 Sep 2019 17:03:03 +0200 [thread overview]
Message-ID: <20190911150303.6567-1-m.felsch@pengutronix.de> (raw)
If the current regulator can't be requested because of -EPROBE_DEFER we
shouldn't print a error and ignore it.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/mci/mci-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 67257bcd18..9e39cbbb55 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1819,6 +1819,10 @@ int mci_register(struct mci_host *host)
host->supply = regulator_get(host->hw_dev, "vmmc");
if (IS_ERR(host->supply)) {
+ if (host->supply == ERR_PTR(-EPROBE_DEFER)) {
+ ret = -EPROBE_DEFER;
+ goto err_free;
+ }
dev_err(&mci->dev, "Failed to get 'vmmc' regulator.\n");
host->supply = NULL;
}
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-09-11 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 15:03 Marco Felsch [this message]
2019-09-12 6:41 ` Sascha Hauer
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=20190911150303.6567-1-m.felsch@pengutronix.de \
--to=m.felsch@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