summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJian Shen <shenjian15@huawei.com>2019-01-27 00:49:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 20:35:33 +0100
commit4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4 (patch)
tree308305072e95b712b3937fc6e29c094499e39a2b
parent82060d9311250f2fe9893b89ae13ba0cb6a9d43f (diff)
downloadlinux-stable-4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4.tar.gz
linux-stable-4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4.tar.bz2
linux-stable-4f6f6ba644cb1ae67b0f887021ee96cce3c30ef4.zip
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.c1
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);
}
/**