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>
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;
return 0;
fail:
- if (mci) {
- if(mci->pdev)
- pci_dev_put(mci->pdev);
+ if (mci != NULL)
edac_mc_free(mci);
- }
return rc;
}
return;
if (edac_mc_del_mc(mci))
return;
- pci_dev_put(mci->pdev);
edac_mc_free(mci);
}