Skip to content

Commit

Permalink
ptp_ocp: do not call pci_set_drvdata(pdev, NULL)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Jakub Kicinski committed Jun 10, 2022
1 parent 3a544eb commit 0fb0bf7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/ptp/ptp_ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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);
Expand Down

0 comments on commit 0fb0bf7

Please sign in to comment.