* [PATCH 2/2] sd: skip reclaiming host on mmc_add_card() error
@ 2015-10-14 20:54 Sergei Shtylyov
0 siblings, 0 replies; only message in thread
From: Sergei Shtylyov @ 2015-10-14 20:54 UTC (permalink / raw)
To: ulf.hansson, linux-mmc; +Cc: linux-kernel
There's little sense in releasing the host on mmc_add_card() error
immediately after reclaiming it, so reclaim the host only in case
of success.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against Ulf Hansson's 'mmc.git' repo's 'next' branch.
drivers/mmc/core/sd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: mmc/drivers/mmc/core/sd.c
===================================================================
--- mmc.orig/drivers/mmc/core/sd.c
+++ mmc/drivers/mmc/core/sd.c
@@ -1243,14 +1243,13 @@ int mmc_attach_sd(struct mmc_host *host)
mmc_release_host(host);
err = mmc_add_card(host->card);
- mmc_claim_host(host);
if (err)
goto remove_card;
+ mmc_claim_host(host);
return 0;
remove_card:
- mmc_release_host(host);
mmc_remove_card(host->card);
host->card = NULL;
mmc_claim_host(host);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-14 20:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 20:54 [PATCH 2/2] sd: skip reclaiming host on mmc_add_card() error Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®