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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, February 1, 2008 - 4:03 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=529132...
Commit:     52913246e0056c9c6215a778a3b31b6b9ce5c3ef
Parent:     e83a2ea850bf0c0c81c675444080970fc07798c6
Author:     Rami Rosen <ramirose@gmail.com>
AuthorDate: Thu Jan 31 16:56:03 2008 -0800
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Thu Jan 31 19:28:25 2008 -0800

    [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>
---
 drivers/net/macvlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6ef6b8b..f651a81 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[MACVLAN]: Setting macvlan_handle_frame_hook to NULL when ..., Linux Kernel Mailing ..., (Fri Feb 1, 4:03 am)