Message ID | 20191027203309.714870582@linuxfoundation.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
--- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -532,7 +532,11 @@ void ghes_edac_unregister(struct ghes *g 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); }