[PATCH v2] EDAC/aspeed: do not fail probe when ECC is disabled

Eric Yun Lin Chiang ericyunlinchiang at gmail.com
Thu Dec 3 16:56:37 PST 2026


Running an AST2600 without DRAM ECC is a normal setup, but
aspeed_probe() returns -EPERM in that case, so every such board logs
"probe with driver aspeed-edac failed with error -1" at boot.

Return -ENODEV, which the driver core does not report as a probe
failure, and lower the message to dev_info.

Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
Signed-off-by: Eric Yun Lin Chiang <ericyunlinchiang at gmail.com>
---
v2:
- Shorter changelog; the AI note moved below the --- line (Ryan Chen).
- v1: https://lore.kernel.org/all/20261118151907.3949719-1-ericyunlinchiang@gmail.com/

Tested: on QEMU ast2600-evb, mainline d06ce6f1eb5e prints
"probe with driver aspeed-edac failed with error -1"; with this patch
only the info line "ECC mode is not configured in u-boot" remains.
Both kernels booted to the initramfs, which then stopped because no
flash image was attached. Not tested on hardware.

This change was prepared with the help of an AI coding assistant
(Claude); I reviewed it and stand behind it.

 drivers/edac/aspeed_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 6e069b255..e6f8cf78a 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -295,8 +295,8 @@ static int aspeed_probe(struct platform_device *pdev)
 	/* bail out if ECC mode is not configured */
 	regmap_read(aspeed_regmap, ASPEED_MCR_CONF, &reg04);
 	if (!(reg04 & ASPEED_MCR_CONF_ECC)) {
-		dev_err(&pdev->dev, "ECC mode is not configured in u-boot\n");
-		return -EPERM;
+		dev_info(&pdev->dev, "ECC mode is not configured in u-boot\n");
+		return -ENODEV;
 	}
 
 	edac_op_state = EDAC_OPSTATE_INT;
-- 
2.53.0




More information about the linux-arm-kernel mailing list