mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
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: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6e22066fd0
commit
5288b6fff1
@ -194,7 +194,6 @@ err_release_regions:
|
||||
err_disable_device:
|
||||
pci_disable_device(pdev);
|
||||
err_kfree:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
devm_kfree(dev, xcv);
|
||||
xcv = NULL;
|
||||
return err;
|
||||
@ -211,7 +210,6 @@ static void xcv_remove(struct pci_dev *pdev)
|
||||
|
||||
pci_release_regions(pdev);
|
||||
pci_disable_device(pdev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
static struct pci_driver xcv_driver = {
|
||||
|
Loading…
Reference in New Issue
Block a user