]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: adjust hns3_uninit_phy()'s location in the hns3_client_uninit()
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 28 May 2019 09:03:01 +0000 (17:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 00:39:01 +0000 (17:39 -0700)
commit442b9586773c00378ee7bac2b0193ddcb3506c40
tree04c6ad8209faf8f7561b083293be2956e04d862f
parent112b82c2f13231b41b6bd906fb9b5b8a669ae311
net: hns3: adjust hns3_uninit_phy()'s location in the hns3_client_uninit()

hns3_uninit_phy() should be called before checking
HNS3_NIC_STATE_INITED flags, otherwise when this checking fails,
there is nobody to call hns3_uninit_phy().

Fixes: da817d0ae061 ("net: hns3: Fix NULL deref when unloading driver")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c