summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-19 09:25:45 +0800
committerMarek Szyprowski <m.szyprowski@samsung.com>2014-05-15 07:20:57 +0200
commitbdd26bd4949076a84ed3437a70bc2428273c8428 (patch)
tree2452028a72598c50c1b26dd78e90602eaba49ae4 /drivers/mmc
parent099725957bab9060f2622abdf77013522f269082 (diff)
downloadlinux-3.10-bdd26bd4949076a84ed3437a70bc2428273c8428.tar.gz
linux-3.10-bdd26bd4949076a84ed3437a70bc2428273c8428.tar.bz2
linux-3.10-bdd26bd4949076a84ed3437a70bc2428273c8428.zip
mmc: dw_mmc: fix error return code in dw_mci_probe()
Fix to return -ENOMEM in alloc workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index bc3a1bc4940..0652690f2d6 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2321,8 +2321,10 @@ int dw_mci_probe(struct dw_mci *host)
tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host);
host->card_workqueue = alloc_workqueue("dw-mci-card",
WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1);
- if (!host->card_workqueue)
+ if (!host->card_workqueue) {
+ ret = -ENOMEM;
goto err_dmaunmap;
+ }
INIT_WORK(&host->card_work, dw_mci_work_routine_card);
ret = devm_request_irq(host->dev, host->irq, dw_mci_interrupt,
host->irq_flags, "dw-mci", host);