Skip to content

Commit

Permalink
EDAC/xgene: Fix deferred probing
Browse files Browse the repository at this point in the history
commit dfd0dfb 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: 0d44293 ("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>
  • Loading branch information
Sergey Shtylyov authored and Greg Kroah-Hartman committed Feb 8, 2022
1 parent 924e4e5 commit 89b53c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/xgene_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,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,
Expand Down

0 comments on commit 89b53c8

Please sign in to comment.