i2c: iop3xx: fix deferred probing
When adding the code to handle platform_get_irq*() errors in the commit489447380a
("handle errors returned by platform_get_irq*()"), the actual error code was enforced to be -ENXIO in the driver for some strange reason. This didn't matter much until the deferred probing was introduced -- which requires an actual error code to be propagated upstream from the failure site. While fixing this, also stop overriding the errors from request_irq() to -EIO (done since the pre-git era). Fixes:489447380a
("[PATCH] handle errors returned by platform_get_irq*()") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Родитель
8d744da241
Коммит
a129950516
|
@ -469,16 +469,14 @@ iop3xx_i2c_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0) {
|
||||||
ret = -ENXIO;
|
ret = irq;
|
||||||
goto unmap;
|
goto unmap;
|
||||||
}
|
}
|
||||||
ret = request_irq(irq, iop3xx_i2c_irq_handler, 0,
|
ret = request_irq(irq, iop3xx_i2c_irq_handler, 0,
|
||||||
pdev->name, adapter_data);
|
pdev->name, adapter_data);
|
||||||
|
|
||||||
if (ret) {
|
if (ret)
|
||||||
ret = -EIO;
|
|
||||||
goto unmap;
|
goto unmap;
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(new_adapter->name, pdev->name, strlen(pdev->name));
|
memcpy(new_adapter->name, pdev->name, strlen(pdev->name));
|
||||||
new_adapter->owner = THIS_MODULE;
|
new_adapter->owner = THIS_MODULE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче