Skip to content

Commit

Permalink
i82875p_edac: Drop redundant call to pci_get_device()
Browse files Browse the repository at this point in the history
The first call to pci_get_device() in i82875p_probe1() is useless. The
result is immediately reset at the beginning of
i82875p_setup_overfl_dev(), which then issues the same
pci_get_device() call. Dropping the redundant call avoids a device
reference leak.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: http://lkml.kernel.org/r/20140224160316.60e55fb6@endymion.delvare
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Jean Delvare authored and Borislav Petkov committed Feb 25, 2014
1 parent 5576fb8 commit 5fdae41
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/edac/i82875p_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,6 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)

edac_dbg(0, "\n");

ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL);

if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window))
return -ENODEV;
drc = readl(ovrfl_window + I82875P_DRC);
Expand Down

0 comments on commit 5fdae41

Please sign in to comment.