Commit 88ef5ea9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

i7core_edac: it is safe to i7core_unregister_mci() when mci=NULL

i7core_unregister_mci() checks internally when mci=NULL. There's no
need to test it outside.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6d37d240
...@@ -2091,10 +2091,9 @@ static int __devinit i7core_probe(struct pci_dev *pdev, ...@@ -2091,10 +2091,9 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
return 0; return 0;
fail1: fail1:
list_for_each_entry(i7core_dev, &i7core_edac_list, list) { list_for_each_entry(i7core_dev, &i7core_edac_list, list)
if (i7core_dev->mci) i7core_unregister_mci(i7core_dev);
i7core_unregister_mci(i7core_dev);
}
i7core_put_all_devices(); i7core_put_all_devices();
fail0: fail0:
mutex_unlock(&i7core_edac_lock); mutex_unlock(&i7core_edac_lock);
...@@ -2126,10 +2125,8 @@ static void __devexit i7core_remove(struct pci_dev *pdev) ...@@ -2126,10 +2125,8 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
return; return;
} }
list_for_each_entry(i7core_dev, &i7core_edac_list, list) { list_for_each_entry(i7core_dev, &i7core_edac_list, list)
if (i7core_dev->mci) i7core_unregister_mci(i7core_dev);
i7core_unregister_mci(i7core_dev);
}
/* Release PCI resources */ /* Release PCI resources */
i7core_put_all_devices(); i7core_put_all_devices();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment