aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i5000_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/i5000_edac.c')
-rw-r--r--drivers/edac/i5000_edac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index f0d9b415db50..d335086f4a26 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -1381,6 +1381,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1381 if (mci == NULL) 1381 if (mci == NULL)
1382 return -ENOMEM; 1382 return -ENOMEM;
1383 1383
1384 kobject_get(&mci->edac_mci_kobj);
1384 debugf0("MC: " __FILE__ ": %s(): mci = %p\n", __func__, mci); 1385 debugf0("MC: " __FILE__ ": %s(): mci = %p\n", __func__, mci);
1385 1386
1386 mci->dev = &pdev->dev; /* record ptr to the generic device */ 1387 mci->dev = &pdev->dev; /* record ptr to the generic device */
@@ -1453,6 +1454,7 @@ fail1:
1453 i5000_put_devices(mci); 1454 i5000_put_devices(mci);
1454 1455
1455fail0: 1456fail0:
1457 kobject_put(&mci->edac_mci_kobj);
1456 edac_mc_free(mci); 1458 edac_mc_free(mci);
1457 return -ENODEV; 1459 return -ENODEV;
1458} 1460}
@@ -1498,7 +1500,7 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev)
1498 1500
1499 /* retrieve references to resources, and free those resources */ 1501 /* retrieve references to resources, and free those resources */
1500 i5000_put_devices(mci); 1502 i5000_put_devices(mci);
1501 1503 kobject_put(&mci->edac_mci_kobj);
1502 edac_mc_free(mci); 1504 edac_mc_free(mci);
1503} 1505}
1504 1506