mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
mmc: Exit from mmc_init() if mmc_complete_init() fails
In case mmc_complete_init() returns error, exit from mmc_init() without possibly calling cyclic_register(), which at that point would be undesired. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -3073,8 +3073,10 @@ int mmc_init(struct mmc *mmc)
|
||||
|
||||
if (!err)
|
||||
err = mmc_complete_init(mmc);
|
||||
if (err)
|
||||
if (err) {
|
||||
pr_info("%s: %d, time %lu\n", __func__, err, get_timer(start));
|
||||
return err;
|
||||
}
|
||||
|
||||
if (CONFIG_IS_ENABLED(CYCLIC, (!mmc->cyclic.func), (NULL))) {
|
||||
/* Register cyclic function for card detect polling */
|
||||
|
||||
Reference in New Issue
Block a user