diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2024-03-18 09:47:52 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-03-18 09:47:52 -0700 |
commit | 5e28061128646febc71c0942609619e29f41ff00 (patch) | |
tree | 9fc836e739a4f1f312a9891c6f6a675cd325959f /net/devlink/core.c | |
parent | 270700dd06ca41a4779c19eb46608f076bb7d40e (diff) | |
parent | e8f897f4afef0031fe618a8e94127a0934896aba (diff) |
Merge branch 'master' into mm-stable
Diffstat (limited to 'net/devlink/core.c')
-rw-r--r-- | net/devlink/core.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/devlink/core.c b/net/devlink/core.c index 6a58342752b4..7f0b093208d7 100644 --- a/net/devlink/core.c +++ b/net/devlink/core.c @@ -529,14 +529,20 @@ static int __init devlink_init(void) { int err; - err = genl_register_family(&devlink_nl_family); - if (err) - goto out; err = register_pernet_subsys(&devlink_pernet_ops); if (err) goto out; + err = genl_register_family(&devlink_nl_family); + if (err) + goto out_unreg_pernet_subsys; err = register_netdevice_notifier(&devlink_port_netdevice_nb); + if (!err) + return 0; + + genl_unregister_family(&devlink_nl_family); +out_unreg_pernet_subsys: + unregister_pernet_subsys(&devlink_pernet_ops); out: WARN_ON(err); return err; |