]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:04 +0000 (14:23 -0300)
BugLink: https://bugs.launchpad.net/bugs/1857158
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index e8487ccea99f6ef31b575013c2a22756e4e41147..3ec1ffecd24f3750ebfc8e9ee7d92892e96bd529 100644 (file)
@@ -1762,6 +1762,7 @@ static void hns3_remove(struct pci_dev *pdev)
                hns3_disable_sriov(pdev);
 
        hnae3_unregister_ae_dev(ae_dev);
+       pci_set_drvdata(pdev, NULL);
 }
 
 /**