aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 04:38:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:06 -0500
commit225159bd0a349bfd8cd9ae7c6bf39d75df09304a (patch)
tree73e99a2d140ee0724f7a10ee8ef63fefc600d2db /drivers
parent680cbbbb0e336b04b74be48b8ddd870537f1e226 (diff)
[PATCH] EDAC: amd76x pci_dev_get/pci_dev_put fixes
Eliminate unnecessary calls to pci_dev_get() and pci_dev_put() from amd76x driver. Signed-off-by: David S. Peterson <dsp@llnl.gov> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/amd76x_edac.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index da171a56b636..6b7a441f0482 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -226,7 +226,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
226 226
227 debugf0("%s(): mci = %p\n", __func__, mci); 227 debugf0("%s(): mci = %p\n", __func__, mci);
228 228
229 mci->pdev = pci_dev_get(pdev); 229 mci->pdev = pdev;
230 mci->mtype_cap = MEM_FLAG_RDDR; 230 mci->mtype_cap = MEM_FLAG_RDDR;
231 231
232 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; 232 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
@@ -284,11 +284,8 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
284 return 0; 284 return 0;
285 285
286fail: 286fail:
287 if (mci) { 287 if (mci != NULL)
288 if(mci->pdev)
289 pci_dev_put(mci->pdev);
290 edac_mc_free(mci); 288 edac_mc_free(mci);
291 }
292 return rc; 289 return rc;
293} 290}
294 291
@@ -322,7 +319,6 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev)
322 return; 319 return;
323 if (edac_mc_del_mc(mci)) 320 if (edac_mc_del_mc(mci))
324 return; 321 return;
325 pci_dev_put(mci->pdev);
326 edac_mc_free(mci); 322 edac_mc_free(mci);
327} 323}
328 324