aboutsummaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorBorislav Petkov2019-10-17 13:47:12 +0200
committerBorislav Petkov2019-10-17 13:47:12 +0200
commit3a5e7ec9031f1c6a5eccd24151fda8c4a07a318e (patch)
treeb5333cb039814cf4f7b9d6e11499cf9cf90e00fa /drivers/edac
parent9816b4af4351bf9d33c2e635b6f14327823a9c2a (diff)
parent1e72e673b9d102ff2e8333e74b3308d012ddf75b (diff)
Merge branch 'edac-urgent' into edac-for-next
Pick up urgent change into next queue. Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/ghes_edac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index d413a0bdc9ad..0bb62857ffb2 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -553,7 +553,11 @@ void ghes_edac_unregister(struct ghes *ghes)
if (!ghes_pvt)
return;
+ if (atomic_dec_return(&ghes_init))
+ return;
+
mci = ghes_pvt->mci;
+ ghes_pvt = NULL;
edac_mc_del_mc(mci->pdev);
edac_mc_free(mci);
}