linux/drivers/net/ethernet/hisilicon/hns3/hns3pf
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
..
hclge_cmd.c net: hns3: fix a dead loop in hclge_cmd_csq_clean 2018-05-01 15:08:37 -04:00
hclge_cmd.h net: hns3: fix for getting wrong link mode problem 2018-03-22 13:12:02 -04:00
hclge_dcb.c net: hns3: add support for querying pfc puase packets statistic 2018-03-11 22:53:32 -04:00
hclge_dcb.h net: hns3: Add hclge_dcb module for the support of DCB feature 2017-09-28 10:35:12 -07:00
hclge_main.c net: hns3: Fix for the null pointer problem occurring when initializing ae_dev failed 2018-05-16 11:33:07 -04:00
hclge_main.h net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver 2018-05-10 14:16:36 -04:00
hclge_mbx.c net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver 2018-05-10 14:16:36 -04:00
hclge_mdio.c net: hns3: fix for phy_addr error in hclge_mac_mdio_config 2018-05-01 15:08:37 -04:00
hclge_mdio.h net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC 2017-08-03 15:08:17 -07:00
hclge_tm.c net: hns3: Remove error log when getting pfc stats fails 2018-05-01 15:08:36 -04:00
hclge_tm.h net: hns3: add support for querying pfc puase packets statistic 2018-03-11 22:53:32 -04:00
Makefile net: hns3: Add mailbox support to PF driver 2017-12-15 10:55:35 -05:00