Skip to content

Commit

Permalink
[MACVLAN]: Setting macvlan_handle_frame_hook to NULL when rtnl_link_r…
Browse files Browse the repository at this point in the history
…egister() 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: Rami Rosen <ramirose@gmail.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rami Rosen authored and David S. Miller committed Feb 1, 2008
1 parent e83a2ea commit 5291324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5291324

Please sign in to comment.