]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ptp_ocp: do not call pci_set_drvdata(pdev, NULL)
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 8 Jun 2022 12:03:57 +0000 (15:03 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Jun 2022 15:36:08 +0000 (08:36 -0700)
Cleaning up driver data is actually already handled by driver core,
so there is no need to do it manually.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_ocp.c

index 62c628ded9eeba6d7b23d9741820a693a54745f4..d92d7e42667c5a1f3e60e3d4550e73142faa74ee 100644 (file)
@@ -3772,7 +3772,6 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 out:
        ptp_ocp_detach(bp);
-       pci_set_drvdata(pdev, NULL);
 out_disable:
        pci_disable_device(pdev);
 out_free:
@@ -3788,7 +3787,6 @@ ptp_ocp_remove(struct pci_dev *pdev)
 
        devlink_unregister(devlink);
        ptp_ocp_detach(bp);
-       pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
 
        devlink_free(devlink);