The order of function calling in skx_exit() is not the reversed order in skx_init(). Fix it by moving skx_remove() to the last. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx> --- drivers/edac/skx_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c index dd209e0dd9ab..d264e933695c 100644 --- a/drivers/edac/skx_edac.c +++ b/drivers/edac/skx_edac.c @@ -1175,8 +1175,8 @@ static void __exit skx_exit(void) { edac_dbg(2, "\n"); mce_unregister_decode_chain(&skx_mce_dec); - skx_remove(); teardown_skx_debug(); + skx_remove(); } module_init(skx_init); -- 2.17.1