diff options
author | Jian Shen <shenjian15@huawei.com> | 2019-01-26 19:49:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-17 22:35:33 +0300 |
commit | 4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4 (patch) | |
tree | 308305072e95b712b3937fc6e29c094499e39a2b | |
parent | 82060d9311250f2fe9893b89ae13ba0cb6a9d43f (diff) | |
download | linux-4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4.tar.xz |
net: hns3: clear pci private data when unload hns3 driver
[ Upstream commit ac864c2346d087dd3739435af1b8d36be5f60c75 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index b2860087a7dc..4b4d9de0a6bb 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1620,6 +1620,7 @@ static void hns3_remove(struct pci_dev *pdev) hns3_disable_sriov(pdev); hnae3_unregister_ae_dev(ae_dev); + pci_set_drvdata(pdev, NULL); } /** |