[MACVLAN]: Setting macvlan_handle_frame_hook to NULL when rtnl_link_register() fails.
authorRami Rosen <ramirose@gmail.com>
Fri, 1 Feb 2008 00:56:03 +0000 (16:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2008 03:28:25 +0000 (19:28 -0800)
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>
drivers/net/macvlan.c

index 6ef6b8b39e71dd5001d1f87c5bc3753ba045b790..f651a816b280bfcb04d1d6fdda8d12e2819b4ce5 100644 (file)
@@ -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;
 }