All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/15] EDAC: amd76x pci_dev_get/pci_dev_put fixes
@ 2006-03-03  1:47 Dave Peterson
  0 siblings, 0 replies; only message in thread
From: Dave Peterson @ 2006-03-03  1:47 UTC (permalink / raw)
  To: alan, akpm; +Cc: linux-kernel, bluesmoke-devel

Eliminate unnecessary calls to pci_dev_get() and pci_dev_put() from
amd76x driver.

Signed-Off-By: David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
---

Index: linux-2.6.16-rc5-edac/drivers/edac/amd76x_edac.c
===================================================================
--- linux-2.6.16-rc5-edac.orig/drivers/edac/amd76x_edac.c	2006-02-27 16:58:41.000000000 -0800
+++ linux-2.6.16-rc5-edac/drivers/edac/amd76x_edac.c	2006-02-27 17:00:39.000000000 -0800
@@ -226,7 +226,7 @@ static int amd76x_probe1(struct pci_dev 
 
 	debugf0("%s(): mci = %p\n", __func__, mci);
 
-	mci->pdev = pci_dev_get(pdev);
+	mci->pdev = pdev;
 	mci->mtype_cap = MEM_FLAG_RDDR;
 
 	mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
@@ -284,11 +284,8 @@ static int amd76x_probe1(struct pci_dev 
 	return 0;
 
 fail:
-	if (mci) {
-		if(mci->pdev)
-			pci_dev_put(mci->pdev);
+	if (mci != NULL)
 		edac_mc_free(mci);
-	}
 	return rc;
 }
 
@@ -322,7 +319,6 @@ static void __devexit amd76x_remove_one(
 		return;
 	if (edac_mc_del_mc(mci))
 		return;
-	pci_dev_put(mci->pdev);
 	edac_mc_free(mci);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-03  1:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-03  1:47 [PATCH 4/15] EDAC: amd76x pci_dev_get/pci_dev_put fixes Dave Peterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.