mci: core: Do not fail if vmmc regulator fail
The vmmc regulator can be an usupported device for barebox, the specific MFD regulator type, for example. Just lets think is all ok. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
5cf7d7014a
commit
f296a48612
|
@ -1589,12 +1589,14 @@ static int mci_card_probe(struct mci *mci)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!IS_ERR(host->supply)) {
|
||||
ret = regulator_enable(host->supply);
|
||||
if (ret) {
|
||||
dev_err(&mci->dev, "failed to enable regulator: %s\n",
|
||||
strerror(-ret));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* start with a host interface reset */
|
||||
rc = (host->init)(host, &mci->dev);
|
||||
|
@ -1684,6 +1686,7 @@ on_error:
|
|||
if (rc != 0) {
|
||||
host->clock = 0; /* disable the MCI clock */
|
||||
mci_set_ios(mci);
|
||||
if (!IS_ERR(host->supply))
|
||||
regulator_disable(host->supply);
|
||||
}
|
||||
|
||||
|
@ -1771,10 +1774,8 @@ int mci_register(struct mci_host *host)
|
|||
mci->dev.detect = mci_detect;
|
||||
|
||||
host->supply = regulator_get(host->hw_dev, "vmmc");
|
||||
if (IS_ERR(host->supply)) {
|
||||
ret = PTR_ERR(host->supply);
|
||||
goto err_free;
|
||||
}
|
||||
if (IS_ERR(host->supply))
|
||||
dev_err(&mci->dev, "Failed to get 'vmmc' regulator.\n");
|
||||
|
||||
ret = register_device(&mci->dev);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in New Issue