summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2019-09-11 17:03:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 10:30:12 +0200
commit2e16c52ea277dd002235835a10f349233c31d965 (patch)
tree54c34a8eb0f01943af0faabafb085d3069bbd060 /drivers
parentfc45db983faa9b6731c2c57d117339c0063778b4 (diff)
downloadbarebox-2e16c52ea277dd002235835a10f349233c31d965.tar.gz
barebox-2e16c52ea277dd002235835a10f349233c31d965.tar.xz
mci: core: make mci_register -EPROBE_DEFER sensitive
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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mci/mci-core.c4
1 files changed, 4 insertions, 0 deletions
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;
}