EDAC, ghes: Do not register instance if platform is not whitelisted
Borislav Petkov
maintainerLemme write an official patch:
---
Tony reported seeing
"Internal error: Can't find EDAC structure"
when injecting correctable errors.
The problem is that we should exit registration when platform doesn't match the whitelisted ones.
Do that.
Reviewed-by Tony Luck <[email protected]>
Signed-off-by Borislav Petkov <[email protected]>
Cc Toshi Kani <[email protected]>
Fixes 5deed6b6a479 ("EDAC, ghes: Add platform check")
--- drivers/edac/ghes_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/ghes_edac.c +1 -1
@@ -439,7 +439,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)/* Check if safe to enable on this system */ idx =acpi_match_platform_list (plat_list);if (!force_load && idx <0 ) -return 0 ; +return -ENODEV ;/* * We have only one logical memory controller to which all DIMMs belong.