linux/drivers/net/ethernet/hisilicon/hns3
Fuyun Liang 3e249d3bed net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed
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: 46a3df9f97 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-16 11:33:07 -04:00
..
hns3pf net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed 2018-05-16 11:33:07 -04:00
hns3vf net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed 2018-05-16 11:33:07 -04:00
hclge_mbx.h net: hns3: Add *Asserting Reset* mailbox message & handling in VF 2018-03-22 15:29:04 -04:00
hnae3.c net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed 2018-05-16 11:33:07 -04:00
hnae3.h net: hns3: remove add/del_tunnel_udp in hns3_enet module 2018-05-10 17:27:10 -04:00
hns3_dcbnl.c net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC 2017-12-15 10:55:34 -05:00
hns3_enet.c net: hns3: Fix for deadlock problem occurring when unregistering ae_algo 2018-05-16 11:33:07 -04:00
hns3_enet.h net: hns3: fix length overflow when CONFIG_ARM64_64K_PAGES 2018-04-04 11:46:14 -04:00
hns3_ethtool.c net: hns3: refactor the loopback related function 2018-05-10 17:27:10 -04:00
Makefile net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC 2017-12-15 10:55:34 -05:00