提交 f216c124 编写于 作者: G Gustavo A. R. Silva 提交者: Ulf Hansson

mmc: mxcmmc: fix error return code in mxcmci_probe()

platform_get_irq() returns an error code, but the mxcmmc driver
ignores it and always returns -EINVAL. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.

Print error message and propagate the return value of
platform_get_irq on failure.
Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 0f77934a
......@@ -1014,8 +1014,10 @@ static int mxcmci_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return -EINVAL;
if (irq < 0) {
dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
return irq;
}
mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
if (!mmc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册