Skip to content

Commit

Permalink
Staging: ipack/bridges/tpci200: increment the reference counter of th…
Browse files Browse the repository at this point in the history
…e pci_dev

As indicated in the documentation of pci_dev_get.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Samuel Iglesias Gonsálvez authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 7987812 commit b442bf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/staging/ipack/bridges/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ static int tpci200_pci_probe(struct pci_dev *pdev,
goto out_err_info;
}

pci_dev_get(pdev);

/* Obtain a mapping of the carrier's PCI configuration registers */
ret = pci_request_region(pdev, TPCI200_CFG_MEM_BAR,
KBUILD_MODNAME " Configuration Memory");
Expand Down Expand Up @@ -741,6 +743,7 @@ static int tpci200_pci_probe(struct pci_dev *pdev,
out_err_ioremap:
pci_release_region(pdev, TPCI200_CFG_MEM_BAR);
out_err_pci_request:
pci_dev_put(pdev);
kfree(tpci200->info);
out_err_info:
kfree(tpci200);
Expand Down

0 comments on commit b442bf7

Please sign in to comment.