Message ID | 20200911164950.GB19320@zn.tnic (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | EDAC/ghes: Check whether the driver is on the safe list correctly | expand |
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index eb6034a6fbbb..dbbefd2798c5 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -508,6 +508,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev) if (!force_load && idx < 0) return -ENODEV; } else { + force_load = true; idx = 0; } @@ -629,6 +630,9 @@ void ghes_edac_unregister(struct ghes *ghes) struct mem_ctl_info *mci; unsigned long flags; + if (!force_load) + return; + mutex_lock(&ghes_reg_mutex); system_scanned = false;