EDAC: Fix workqueue-related crashes
EDAC: Fix workqueue-related crashes

00740c58541b6087d78418cebca1fcb86dc6077d changed edac_core to
un-/register a workqueue item only if a lowlevel driver supplies a
polling routine. Normally, when we remove a polling low-level driver, we
go and cancel all the queued work. However, the workqueue unreg happens
based on the ->op_state setting, and edac_mc_del_mc() sets this to
OP_OFFLINE _before_ we cancel the work item, leading to NULL ptr oops on
the workqueue list.

Fix it by putting the unreg stuff in proper order.

Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org> #36.x
Reported-and-tested-by: Tobias Karnat <2af2dc9747230caa345ddd22aa77f73074c1ac0f@googlemail.com>
LKML-Reference: <13c916efeecfafa2a68b12fe241880ea644231eb@Tobias-Karnat>
Signed-off-by: Borislav Petkov <2b4cb5acba6b5321acd37371d9b73a646c388783@amd.com>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs