Commit 742e5229 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Zheng Zengkai
Browse files

net: hns3: remove always exist devlink pointer check

mainline inclusion
from mainline-master
commit a1fcb106
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I46N6O
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a1fcb106ae97cc34cc8101efafb89eaa837be009



----------------------------------------------------------------------

The devlink pointer always exists after hclge_devlink_init() succeed.
Remove that check together with NULL setting after release and ensure
that devlink_register is last command prior to call to devlink_reload_enable().

Fixes: b741269b ("net: hns3: add support for registering devlink for PF")
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Reviewed-by: default avatarYongxin Li <liyongxin1@huawei.com>
Signed-off-by: default avatarJunxin Chen <chenjunxin1@huawei.com>
(fix conflicts: interface devlink_register adapt)
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 687357a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment