return 0;
fail1:
- list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
- if (i7core_dev->mci)
- i7core_unregister_mci(i7core_dev);
- }
+ list_for_each_entry(i7core_dev, &i7core_edac_list, list)
+ i7core_unregister_mci(i7core_dev);
+
i7core_put_all_devices();
fail0:
mutex_unlock(&i7core_edac_lock);
return;
}
- list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
- if (i7core_dev->mci)
- i7core_unregister_mci(i7core_dev);
- }
+ list_for_each_entry(i7core_dev, &i7core_edac_list, list)
+ i7core_unregister_mci(i7core_dev);
/* Release PCI resources */
i7core_put_all_devices();