Commit ef7aef9a authored by Wei Yongjun's avatar Wei Yongjun Committed by Chris Ball

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 775a9362
...@@ -2321,8 +2321,10 @@ int dw_mci_probe(struct dw_mci *host) ...@@ -2321,8 +2321,10 @@ int dw_mci_probe(struct dw_mci *host)
tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host); tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host);
host->card_workqueue = alloc_workqueue("dw-mci-card", host->card_workqueue = alloc_workqueue("dw-mci-card",
WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1); WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1);
if (!host->card_workqueue) if (!host->card_workqueue) {
ret = -ENOMEM;
goto err_dmaunmap; goto err_dmaunmap;
}
INIT_WORK(&host->card_work, dw_mci_work_routine_card); INIT_WORK(&host->card_work, dw_mci_work_routine_card);
ret = devm_request_irq(host->dev, host->irq, dw_mci_interrupt, ret = devm_request_irq(host->dev, host->irq, dw_mci_interrupt,
host->irq_flags, "dw-mci", host); host->irq_flags, "dw-mci", host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment