diff options
author | Sergey Shtylyov <s.shtylyov@omp.ru> | 2022-01-24 21:55:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-08 18:15:30 +0100 |
commit | 4b5fc3acd85278f8ba8329299b7cf437c3c9b296 (patch) | |
tree | acca66d8cd9d6694cd5e7753ee04cb7af97b5f74 | |
parent | 7d16424235c4f87f65dc600cdf39e0f2d6aacd76 (diff) | |
download | linux-4b5fc3acd85278f8ba8329299b7cf437c3c9b296.tar.gz linux-4b5fc3acd85278f8ba8329299b7cf437c3c9b296.tar.bz2 linux-4b5fc3acd85278f8ba8329299b7cf437c3c9b296.zip |
EDAC/xgene: Fix deferred probing
commit dfd0dfb9a7cc04acf93435b440dd34c2ca7b4424 upstream.
The driver overrides error codes returned by platform_get_irq_optional()
to -EINVAL for some strange reason, so if it returns -EPROBE_DEFER, the
driver will fail the probe permanently instead of the deferred probing.
Switch to propagating the proper error codes to platform driver code
upwards.
[ bp: Massage commit message. ]
Fixes: 0d4429301c4a ("EDAC: Add APM X-Gene SoC EDAC driver")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220124185503.6720-3-s.shtylyov@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/edac/xgene_edac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c index bf19b6e3bd12..771927d2b5de 100644 --- a/drivers/edac/xgene_edac.c +++ b/drivers/edac/xgene_edac.c @@ -1936,7 +1936,7 @@ static int xgene_edac_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, i); if (irq < 0) { dev_err(&pdev->dev, "No IRQ resource\n"); - rc = -EINVAL; + rc = irq; goto out_err; } rc = devm_request_irq(&pdev->dev, irq, |