diff options
-rw-r--r-- | drivers/mmc/host/omap.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index feda3064b2cd..6b07730598da 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1485,24 +1485,27 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1485 | } | 1485 | } |
1486 | 1486 | ||
1487 | host->nr_slots = pdata->nr_slots; | 1487 | host->nr_slots = pdata->nr_slots; |
1488 | |||
1489 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | ||
1490 | if (!host->mmc_omap_wq) | ||
1491 | goto err_plat_cleanup; | ||
1492 | |||
1488 | for (i = 0; i < pdata->nr_slots; i++) { | 1493 | for (i = 0; i < pdata->nr_slots; i++) { |
1489 | ret = mmc_omap_new_slot(host, i); | 1494 | ret = mmc_omap_new_slot(host, i); |
1490 | if (ret < 0) { | 1495 | if (ret < 0) { |
1491 | while (--i >= 0) | 1496 | while (--i >= 0) |
1492 | mmc_omap_remove_slot(host->slots[i]); | 1497 | mmc_omap_remove_slot(host->slots[i]); |
1493 | 1498 | ||
1494 | goto err_plat_cleanup; | 1499 | goto err_destroy_wq; |
1495 | } | 1500 | } |
1496 | } | 1501 | } |
1497 | 1502 | ||
1498 | host->reg_shift = (cpu_is_omap7xx() ? 1 : 2); | 1503 | host->reg_shift = (cpu_is_omap7xx() ? 1 : 2); |
1499 | 1504 | ||
1500 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | ||
1501 | if (!host->mmc_omap_wq) | ||
1502 | goto err_plat_cleanup; | ||
1503 | |||
1504 | return 0; | 1505 | return 0; |
1505 | 1506 | ||
1507 | err_destroy_wq: | ||
1508 | destroy_workqueue(host->mmc_omap_wq); | ||
1506 | err_plat_cleanup: | 1509 | err_plat_cleanup: |
1507 | if (pdata->cleanup) | 1510 | if (pdata->cleanup) |
1508 | pdata->cleanup(&pdev->dev); | 1511 | pdata->cleanup(&pdev->dev); |