]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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 5ef3bdc7c8081b338099f6619383bc283cc9e857..cec09235b1ef1648e086e6153d0b2ea0a3a7d895 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);
 }
 
 /**