Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aeed9e82cd258b9699eaa6568efefba9cc6d5f01
Commit:     aeed9e82cd258b9699eaa6568efefba9cc6d5f01
Parent:     7f988eab57bd22884bbc452fb04c6c18738666b3
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 16:37:19 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 02:28:14 2007 -0700

    [NET] loopback: Panic if registration fails
    
    Because IPv4 and IPv6 both depend on the presence of the loopback
    device to function, failure in registration the loopback device should
    be fatal.
    
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/loopback.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 6ba6ed2..5106c23 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -229,7 +229,12 @@ struct net_device loopback_dev = {
 /* Setup and register the loopback device. */
 static int __init loopback_init(void)
 {
-       return register_netdev(&loopback_dev);
+       int err = register_netdev(&loopback_dev);
+
+       if (err)
+               panic("loopback: Failed to register netdevice: %d\n", err);
+
+       return err;
 };
 
 module_init(loopback_init);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to