From b442bf738454d5eeaf695e45051e9fa7242bb9a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Tue, 11 Sep 2012 13:35:05 +0200 Subject: [PATCH] Staging: ipack/bridges/tpci200: increment the reference counter of the pci_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As indicated in the documentation of pci_dev_get. Signed-off-by: Samuel Iglesias Gonsálvez Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ipack/bridges/tpci200.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 383571c0511..b9281406706 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); -- 2.20.1