EDAC, skx: Fix function calling order in skx_exit()
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Fri, 16 Nov 2018 07:33:36 +0000 (15:33 +0800)
committerBorislav Petkov <bp@suse.de>
Fri, 16 Nov 2018 10:17:11 +0000 (11:17 +0100)
The order of function calling in skx_exit() is not the reversed order in
skx_init(). Fix it.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Tony Luck <tony.luck@intel.com>
CC: arozansk@redhat.com
CC: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1542353616-13421-1-git-send-email-qiuxu.zhuo@intel.com
drivers/edac/skx_edac.c

index a99ea61dad321dddad4ab28bea15ce593ae0c24f..b23c8aaa5f2b21041eda640522c7d4ab021106ae 100644 (file)
@@ -1339,11 +1339,11 @@ static void __exit skx_exit(void)
 {
        edac_dbg(2, "\n");
        mce_unregister_decode_chain(&skx_mce_dec);
-       skx_remove();
+       teardown_skx_debug();
        if (nvdimm_count)
                skx_adxl_put();
        kfree(skx_msg);
-       teardown_skx_debug();
+       skx_remove();
 }
 
 module_init(skx_init);