mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ghes, EDAC: Fix ghes_edac registration
Tony reported seeing "Internal error: Can't find EDAC structure" when injecting correctable errors due to the fact that ghes_edac would still load even if the whitelist won't hit. Drop the pr_err() in ghes_edac_report_mem_error() for now due to the hacky way how ghes_edac depends on ghes.c. While at it, make ghes_edac_register() return an error if it doesn't hit in the whitelist as it is the only sensible thing to do in that situation. Furthermore, move the call to it to happen last in ghes_probe() so that GHES initializing properly does not depend on ghes_edac init at all as latter is only reporting errors and not required for GHES's proper functioning. Reviewed-by: Toshi Kani <[email protected]> Tested-by: Sughosh Ganu <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Tony Luck <[email protected]> Link: https://lkml.kernel.org/r/20180420182015.zao3olss4tvvlxki@agluck-desk
This commit is contained in:
parent
6d08b06e67
commit
cc7f3f1326
3 changed files with 9 additions and 13 deletions
|
|
@ -70,7 +70,7 @@ static inline void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
|
|||
|
||||
static inline int ghes_edac_register(struct ghes *ghes, struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void ghes_edac_unregister(struct ghes *ghes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue