diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2017-06-09 15:27:17 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-06-20 10:30:39 +0200 |
commit | 82e7edc216f1a066da10f224ae2e4cd83e53fc13 (patch) | |
tree | 6f3048de7cd528412b5712427328a68bdcfbf533 /drivers/mmc | |
parent | bc55dcd822f98cd7c170d0aeac4ed4fb79c86bda (diff) | |
download | linux-82e7edc216f1a066da10f224ae2e4cd83e53fc13.tar.bz2 |
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: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sdio.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index fae732c870a9..f077fc8219d0 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1159,15 +1159,14 @@ 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) - mmc_sdio_remove(host); +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: mmc_detach_bus(host); |