summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>2012-09-11 13:35:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 12:18:11 -0700
commitb442bf738454d5eeaf695e45051e9fa7242bb9a3 (patch)
treeb3ef10354bf4dfb99acaba2d5710f07b5898c163
parent7987812295cd734a3ba55c9cd02f16fbaec64ace (diff)
Staging: ipack/bridges/tpci200: increment the reference counter of the 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>
-rw-r--r--drivers/staging/ipack/bridges/tpci200.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index 383571c05112..b92814067061 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -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");
@@ -741,6 +743,7 @@ out_err_install:
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);