aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorRami Rosen <ramirose@gmail.com>2008-01-31 19:56:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:28:25 -0500
commit52913246e0056c9c6215a778a3b31b6b9ce5c3ef (patch)
tree2540abf67d1bd59ab28a06487d424d3d658f6c95 /drivers/net/macvlan.c
parente83a2ea850bf0c0c81c675444080970fc07798c6 (diff)
[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: Rami Rosen <ramirose@gmail.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6ef6b8b39e7..f651a816b28 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -508,7 +508,7 @@ static int __init macvlan_init_module(void)
508 goto err1; 508 goto err1;
509 return 0; 509 return 0;
510err1: 510err1:
511 macvlan_handle_frame_hook = macvlan_handle_frame; 511 macvlan_handle_frame_hook = NULL;
512 unregister_netdevice_notifier(&macvlan_notifier_block); 512 unregister_netdevice_notifier(&macvlan_notifier_block);
513 return err; 513 return err;
514} 514}