summaryrefslogtreecommitdiff
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2024-10-16 11:53:56 -0700
committerPaolo Abeni <pabeni@redhat.com>2024-10-22 11:02:05 +0200
commit26eebdc4b005ccd4cf63f4fef4c9c0adf9bfa380 (patch)
tree68197c23878e90e65c85ff525de86ddc8b6089c9 /net/ipv4/devinet.c
parenta0b63c6457e100b84b1ff9179bc328c0924de75c (diff)
rtnetlink: Return int from rtnl_af_register().
The next patch will add init_srcu_struct() in rtnl_af_register(), then we need to handle its error. Let's add the error handling in advance to make the following patch cleaner. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ec29ead83e74..0ff9c0abfaa0 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -2827,7 +2827,8 @@ void __init devinet_init(void)
register_pernet_subsys(&devinet_ops);
register_netdevice_notifier(&ip_netdev_notifier);
- rtnl_af_register(&inet_af_ops);
+ if (rtnl_af_register(&inet_af_ops))
+ panic("Unable to register inet_af_ops\n");
rtnl_register_many(devinet_rtnl_msg_handlers);
}