diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-11 22:40:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-24 09:20:37 -0400 |
commit | 39300e7143f8ef81b07cee3d8b86880bc4311ea0 (patch) | |
tree | 7f96fd808cd9046e9038575515ab68531a109538 /drivers/edac/i7core_edac.c | |
parent | 41ba6c10586dfab632725cd532677ae5ae460e3e (diff) |
i7core_edac: explicitly remove PCI devices from the devices list
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r-- | drivers/edac/i7core_edac.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index e5aa06e6389..11c61b4d814 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -1240,16 +1240,17 @@ static void i7core_put_devices(struct i7core_dev *i7core_dev) | |||
1240 | pci_dev_put(pdev); | 1240 | pci_dev_put(pdev); |
1241 | } | 1241 | } |
1242 | kfree(i7core_dev->pdev); | 1242 | kfree(i7core_dev->pdev); |
1243 | list_del(&i7core_dev->list); | ||
1244 | kfree(i7core_dev); | ||
1245 | } | 1243 | } |
1246 | 1244 | ||
1247 | static void i7core_put_all_devices(void) | 1245 | static void i7core_put_all_devices(void) |
1248 | { | 1246 | { |
1249 | struct i7core_dev *i7core_dev, *tmp; | 1247 | struct i7core_dev *i7core_dev, *tmp; |
1250 | 1248 | ||
1251 | list_for_each_entry_safe(i7core_dev, tmp, &i7core_edac_list, list) | 1249 | list_for_each_entry_safe(i7core_dev, tmp, &i7core_edac_list, list) { |
1252 | i7core_put_devices(i7core_dev); | 1250 | i7core_put_devices(i7core_dev); |
1251 | list_del(&i7core_dev->list); | ||
1252 | kfree(i7core_dev); | ||
1253 | } | ||
1253 | } | 1254 | } |
1254 | 1255 | ||
1255 | static void __init i7core_xeon_pci_fixup(const struct pci_id_table *table) | 1256 | static void __init i7core_xeon_pci_fixup(const struct pci_id_table *table) |
@@ -1438,7 +1439,6 @@ static int i7core_get_devices(const struct pci_id_table *table) | |||
1438 | } | 1439 | } |
1439 | 1440 | ||
1440 | return 0; | 1441 | return 0; |
1441 | return 0; | ||
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | static int mci_bind_devs(struct mem_ctl_info *mci, | 1444 | static int mci_bind_devs(struct mem_ctl_info *mci, |
@@ -2092,6 +2092,8 @@ static void __devexit i7core_remove(struct pci_dev *pdev) | |||
2092 | /* Release PCI resources */ | 2092 | /* Release PCI resources */ |
2093 | i7core_put_devices(i7core_dev); | 2093 | i7core_put_devices(i7core_dev); |
2094 | } | 2094 | } |
2095 | list_del(&i7core_dev->list); | ||
2096 | kfree(i7core_dev); | ||
2095 | } | 2097 | } |
2096 | probed--; | 2098 | probed--; |
2097 | 2099 | ||