[PATCH v2 7/7] EDAC/igen6: Keep returned errno consistent when edac mc has been enabled

From: Jia He
Date: Wed Aug 17 2022 - 10:36:53 EST


Only a single edac driver can be enabled for EDAC MC. The igen6_init()
should be returned with EBUSY instead of ENODEV, which is consistent with
other edac drivers.

Signed-off-by: Jia He <justin.he@xxxxxxx>
---
drivers/edac/igen6_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index a07bbfd075d0..41503b80347c 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -1273,7 +1273,7 @@ static int __init igen6_init(void)

owner = edac_get_owner();
if (owner && strncmp(owner, EDAC_MOD_STR, sizeof(EDAC_MOD_STR)))
- return -ENODEV;
+ return -EBUSY;

edac_op_state = EDAC_OPSTATE_NMI;

--
2.25.1