diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-08-02 18:49:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-05 16:12:53 +0200 |
commit | 515bc432e4a5b597e36d915df9fb3194c7083078 (patch) | |
tree | 1f86b1c47db4d8df7e7676cce89a9bbaa8e0b612 /drivers/staging/gasket/gasket_core.c | |
parent | a43a98da75ff2821e484e5cb2a7f3ad0354255c8 (diff) |
Revert "staging: gasket: core: hold reference to pci_dev while used"
There's no need to take an additional reference on the pci_dev structure
for the pointer copy saved in gasket data structures.
This reverts commit:
8dd8a48b9a7d ("staging: gasket: core: hold reference to pci_dev while used")
Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket/gasket_core.c')
-rw-r--r-- | drivers/staging/gasket/gasket_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 93a4d9f08eaa..2d209e36cf37 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -255,7 +255,6 @@ static void gasket_free_dev(struct gasket_dev *gasket_dev) internal_desc->devs[gasket_dev->dev_idx] = NULL; mutex_unlock(&internal_desc->mutex); put_device(gasket_dev->dev); - pci_dev_put(gasket_dev->pci_dev); kfree(gasket_dev); } @@ -1477,7 +1476,7 @@ static int gasket_pci_probe(struct pci_dev *pci_dev, ret = gasket_alloc_dev(internal_desc, parent, &gasket_dev, kobj_name); if (ret) return ret; - gasket_dev->pci_dev = pci_dev_get(pci_dev); + gasket_dev->pci_dev = pci_dev; if (IS_ERR_OR_NULL(gasket_dev->dev_info.device)) { pr_err("Cannot create %s device %s [ret = %ld]\n", driver_desc->name, gasket_dev->dev_info.name, |