diff options
-rw-r--r-- | drivers/edac/ghes_edac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 636dcf18d5b6..bb534670ec02 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c | |||
@@ -523,9 +523,9 @@ EXPORT_SYMBOL_GPL(ghes_edac_register); | |||
523 | void ghes_edac_unregister(struct ghes *ghes) | 523 | void ghes_edac_unregister(struct ghes *ghes) |
524 | { | 524 | { |
525 | struct mem_ctl_info *mci; | 525 | struct mem_ctl_info *mci; |
526 | struct ghes_edac_pvt *pvt; | 526 | struct ghes_edac_pvt *pvt, *tmp; |
527 | 527 | ||
528 | list_for_each_entry(pvt, &ghes_reglist, list) { | 528 | list_for_each_entry_safe(pvt, tmp, &ghes_reglist, list) { |
529 | if (ghes == pvt->ghes) { | 529 | if (ghes == pvt->ghes) { |
530 | mci = pvt->mci; | 530 | mci = pvt->mci; |
531 | edac_mc_del_mc(mci->pdev); | 531 | edac_mc_del_mc(mci->pdev); |