提交 71fe0170 编写于 作者: H Hidetoshi Seto 提交者: Mauro Carvalho Chehab

i7core_edac: Check probe counter in i7core_remove

Prevent i7core_remove from running multiple times.
Otherwise value proved will be negative and something will be wrong.
Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 2896637b
......@@ -2092,6 +2092,12 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
*/
mutex_lock(&i7core_edac_lock);
if (unlikely(!probed)) {
mutex_unlock(&i7core_edac_lock);
return;
}
list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
mci = find_mci_by_dev(&i7core_dev->pdev[0]->dev);
if (unlikely(!mci || !mci->pvt_info)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册