提交 52913246 编写于 作者: R Rami Rosen 提交者: David S. Miller

[MACVLAN]: Setting macvlan_handle_frame_hook to NULL when rtnl_link_register() fails.

In drivers/net/macvlan.c, when rtnl_link_register() fails in
macvlan_init_module(), there is no point to set it (second time in
this method) to macvlan_handle_frame; macvlan_init_module() will
return a negative number, so instead this patch sets
macvlan_handle_frame_hook to NULL.
Signed-off-by: NRami Rosen <ramirose@gmail.com>
Acked-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e83a2ea8
......@@ -508,7 +508,7 @@ static int __init macvlan_init_module(void)
goto err1;
return 0;
err1:
macvlan_handle_frame_hook = macvlan_handle_frame;
macvlan_handle_frame_hook = NULL;
unregister_netdevice_notifier(&macvlan_notifier_block);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册