net: devlink: introduce a flag to indicate devlink port being registered
authorJiri Pirko <jiri@nvidia.com>
Thu, 29 Sep 2022 07:28:57 +0000 (09:28 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Oct 2022 01:17:16 +0000 (18:17 -0700)
commit081adcfe930e4b01a55eaa329b2e453a442f35a9
tree6ccbdc692a2a064b8d89a6d483035c690040a3e0
parent3fcb698d9c773d1e0ce5eb4374273457eb4c8338
net: devlink: introduce a flag to indicate devlink port being registered

Instead of relying on devlink pointer not being initialized, introduce
an extra flag to indicate if devlink port is registered. This is needed
as later on devlink pointer is going to be initialized even in case
devlink port is not registered yet.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/devlink.h
net/core/devlink.c