Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332829
b: refs/heads/master
c: 1c2215b
h: refs/heads/master
i:
  332827: b8837e0
v: v3
  • Loading branch information
Thomas Abraham authored and Chris Ball committed Oct 3, 2012
1 parent c392b77 commit 43097c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb8bdc77efdecc868d522691487d261ac32d3237
refs/heads/master: 1c2215b7c6f20a65877431a5ebb4f9a789df3811
23 changes: 13 additions & 10 deletions trunk/drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,7 @@ int dw_mci_probe(struct dw_mci *host)
{
int width, i, ret = 0;
u32 fifo_size;
int init_slots = 0;

if (!host->pdata || !host->pdata->init) {
dev_err(host->dev,
Expand Down Expand Up @@ -2054,10 +2055,18 @@ int dw_mci_probe(struct dw_mci *host)
/* We need at least one slot to succeed */
for (i = 0; i < host->num_slots; i++) {
ret = dw_mci_init_slot(host, i);
if (ret) {
ret = -ENODEV;
goto err_init_slot;
}
if (ret)
dev_dbg(host->dev, "slot %d init failed\n", i);
else
init_slots++;
}

if (init_slots) {
dev_info(host->dev, "%d slots initialized\n", init_slots);
} else {
dev_dbg(host->dev, "attempted to initialize %d slots, "
"but failed on all\n", host->num_slots);
goto err_init_slot;
}

/*
Expand Down Expand Up @@ -2092,12 +2101,6 @@ int dw_mci_probe(struct dw_mci *host)
return 0;

err_init_slot:
/* De-init any initialized slots */
while (i > 0) {
if (host->slot[i])
dw_mci_cleanup_slot(host->slot[i], i);
i--;
}
free_irq(host->irq, host);

err_workqueue:
Expand Down

0 comments on commit 43097c7

Please sign in to comment.