net: hns3: clear pci private data when unload hns3 driver
authorJian Shen <shenjian15@huawei.com>
Sat, 26 Jan 2019 16:49:11 +0000 (00:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Jan 2019 17:33:30 +0000 (09:33 -0800)
When unload hns3 driver, we should clear the pci private data.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index 5ef3bdc..cec0923 100644 (file)
@@ -1781,6 +1781,7 @@ static void hns3_remove(struct pci_dev *pdev)
                hns3_disable_sriov(pdev);
 
        hnae3_unregister_ae_dev(ae_dev);
+       pci_set_drvdata(pdev, NULL);
 }
 
 /**