Commit 5288b6ff authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

net: thunderx: Remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e22066f
...@@ -194,7 +194,6 @@ static int xcv_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -194,7 +194,6 @@ static int xcv_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_disable_device: err_disable_device:
pci_disable_device(pdev); pci_disable_device(pdev);
err_kfree: err_kfree:
pci_set_drvdata(pdev, NULL);
devm_kfree(dev, xcv); devm_kfree(dev, xcv);
xcv = NULL; xcv = NULL;
return err; return err;
...@@ -211,7 +210,6 @@ static void xcv_remove(struct pci_dev *pdev) ...@@ -211,7 +210,6 @@ static void xcv_remove(struct pci_dev *pdev)
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
} }
static struct pci_driver xcv_driver = { static struct pci_driver xcv_driver = {
......
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