提交 5883d9c6 编写于 作者: P Pavel Fedin 提交者: David S. Miller

net: thunder: Fix crash upon shutdown after failed probe

If device probe fails, driver remains bound to the PCI device. However,
driver data has been reset to NULL. This causes crash upon dereferencing
it in nicvf_remove()
Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ed5a377d
......@@ -1600,6 +1600,9 @@ static void nicvf_remove(struct pci_dev *pdev)
static void nicvf_shutdown(struct pci_dev *pdev)
{
if (!pci_get_drvdata(pdev))
return;
nicvf_remove(pdev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册