Commit 82e7edc2 authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: sdio: Tidy error path in mmc_attach_sdio()

The error path deletes the device by calling mmc_sdio_remove() which must
be called without the host claimed. Simplify the error path so it does just
that and add a comment about why we don't disable runtime PM.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent bc55dcd8
......@@ -1159,14 +1159,13 @@ int mmc_attach_sdio(struct mmc_host *host)
return 0;
remove_added:
/* Remove without lock if the device has been added. */
mmc_sdio_remove(host);
mmc_claim_host(host);
remove:
/* And with lock if it hasn't been added. */
mmc_release_host(host);
if (host->card)
remove_added:
/*
* The devices are being deleted so it is not necessary to disable
* runtime PM.
*/
mmc_sdio_remove(host);
mmc_claim_host(host);
err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment