aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/ghes_edac.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-11-14 05:53:10 +1000
committerDave Airlie <airlied@redhat.com>2019-11-14 05:53:10 +1000
commit77e0723bd27f830d0903225372aa778fe2975648 (patch)
tree4c035783e014b3a0ac9174390f88dc75150533e4 /drivers/edac/ghes_edac.c
parentMerge tag 'drm-misc-next-fixes-2019-11-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff)
parentLinux 5.4-rc7 (diff)
downloadlinux-dev-77e0723bd27f830d0903225372aa778fe2975648.tar.xz
linux-dev-77e0723bd27f830d0903225372aa778fe2975648.zip
Merge v5.4-rc7 into drm-next
We have the i915 security fixes to backmerge, but first let's clear the decks for other drivers to avoid a bigger mess. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/edac/ghes_edac.c')
-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);
}