rtnl_link_register() may fail and can impact registering the device. The fix checks the return value and pushes the error upstream.
Signed-off-by: Aditya Pakki pakki001@umn.edu --- net/batman-adv/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 69c0d85bceb3..e0007f242823 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -109,7 +109,10 @@ static int __init batadv_init(void) batadv_debugfs_init();
register_netdevice_notifier(&batadv_hard_if_notifier); - rtnl_link_register(&batadv_link_ops); + ret = rtnl_link_register(&batadv_link_ops); + if (ret < 0) + return ret; + batadv_netlink_register();
pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",