When initializing ae_dev failed during loading hclge.ko, the drvdata will
be set to null. When removing hns3.ko, we get a null ae_dev. It causes the
null pointer problem.
This patch removes pci_set_drvdata from error handle of hclge_init_ae_dev
to fix the bug, since pci_set_drvdata has been called in hns3_remove.
Also, we do not need to uninit the ae_dev which is not initialized. And
it may be the one which is initialized failed.
Fixes:
|
||
---|---|---|
.. | ||
hclge_cmd.c | ||
hclge_cmd.h | ||
hclge_dcb.c | ||
hclge_dcb.h | ||
hclge_main.c | ||
hclge_main.h | ||
hclge_mbx.c | ||
hclge_mdio.c | ||
hclge_mdio.h | ||
hclge_tm.c | ||
hclge_tm.h | ||
Makefile |