Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c982bf4 authored by Sergey Shtylyov's avatar Sergey Shtylyov Committed by Greg Kroah-Hartman
Browse files

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: 0d442930 ("EDAC: Add APM X-Gene SoC EDAC driver")
Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarBorislav 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9bcdaf4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1934,7 +1934,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
			irq = platform_get_irq(pdev, i);
			irq = platform_get_irq(pdev, i);
			if (irq < 0) {
			if (irq < 0) {
				dev_err(&pdev->dev, "No IRQ resource\n");
				dev_err(&pdev->dev, "No IRQ resource\n");
				rc = -EINVAL;
				rc = irq;
				goto out_err;
				goto out_err;
			}
			}
			rc = devm_request_irq(&pdev->dev, irq,
			rc = devm_request_irq(&pdev->dev, irq,