From: Sergei Shtylyov Date: Sat, 24 Nov 2018 18:14:16 +0000 (+0300) Subject: sata_rcar: fix deferred probing X-Git-Tag: v4.9.156~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4f5424d387b9ca5bbae072730593266fd8adf47;p=platform%2Fkernel%2Flinux-amlogic.git sata_rcar: fix deferred probing [ Upstream commit 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 ] 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: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Sergei Shtylyov Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index e83a3d3421b9..07e146b772ea 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -872,7 +872,9 @@ static int sata_rcar_probe(struct platform_device *pdev) int ret = 0; irq = platform_get_irq(pdev, 0); - if (irq <= 0) + if (irq < 0) + return irq; + if (!irq) return -EINVAL; priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),