mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
sata_rcar: fix deferred probing
[ Upstream commit9f83cfdb1a
] The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Switch to propagating the error code upstream, still checking/overriding IRQ0 as libata regards it as "no IRQ" (thus polling) anyway... Fixes:9ec36cafe4
("of/irq: do irq resolution in platform_get_irq") Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d1069fc142
commit
b4f5424d38
1 changed files with 3 additions and 1 deletions
|
@ -872,7 +872,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0)
|
if (irq < 0)
|
||||||
|
return irq;
|
||||||
|
if (!irq)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),
|
priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),
|
||||||
|
|
Loading…
Reference in a new issue