From 0fb0bf7a8c751b39b63456b04a74dee3ecfd2204 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 8 Jun 2022 15:03:57 +0300 Subject: ptp_ocp: do not call pci_set_drvdata(pdev, NULL) 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 Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski --- drivers/ptp/ptp_ocp.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/ptp') diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 62c628ded9ee..d92d7e42667c 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -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); -- cgit v1.2.3