Commit 515bc432 authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

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:
8dd8a48b ("staging: gasket: core: hold reference to pci_dev while used")
Reported-by: default avatarDmitry Torokhov <dtor@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a43a98da
...@@ -255,7 +255,6 @@ static void gasket_free_dev(struct gasket_dev *gasket_dev) ...@@ -255,7 +255,6 @@ static void gasket_free_dev(struct gasket_dev *gasket_dev)
internal_desc->devs[gasket_dev->dev_idx] = NULL; internal_desc->devs[gasket_dev->dev_idx] = NULL;
mutex_unlock(&internal_desc->mutex); mutex_unlock(&internal_desc->mutex);
put_device(gasket_dev->dev); put_device(gasket_dev->dev);
pci_dev_put(gasket_dev->pci_dev);
kfree(gasket_dev); kfree(gasket_dev);
} }
...@@ -1477,7 +1476,7 @@ static int gasket_pci_probe(struct pci_dev *pci_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); ret = gasket_alloc_dev(internal_desc, parent, &gasket_dev, kobj_name);
if (ret) if (ret)
return 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)) { if (IS_ERR_OR_NULL(gasket_dev->dev_info.device)) {
pr_err("Cannot create %s device %s [ret = %ld]\n", pr_err("Cannot create %s device %s [ret = %ld]\n",
driver_desc->name, gasket_dev->dev_info.name, driver_desc->name, gasket_dev->dev_info.name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment