]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: clear inited state and stop client after failed to register netdev
authorJian Shen <shenjian15@huawei.com>
Sun, 24 Apr 2022 12:57:20 +0000 (20:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2022 09:48:49 +0000 (10:48 +0100)
commit918744f84967d47a4d11ac6a8dc68c6ff5eaff03
tree97ac55dcfce13e7617eed4550bb2c708561ad092
parent8a7aaf0657de90586bd954976e8676c346292288
net: hns3: clear inited state and stop client after failed to register netdev

If failed to register netdev, it needs to clear INITED state and stop
client in case of cause problem when concurrency with uninitialized
process of driver.

Fixes: 63dce331205b ("net: hns3: put off calling register_netdev() until client initialize complete")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c