diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-07-31 03:37:19 +0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-31 13:28:14 +0400 |
commit | aeed9e82cd258b9699eaa6568efefba9cc6d5f01 (patch) | |
tree | 0a3cd08162e6c7b11a7fde452877571b48559620 /drivers/net/loopback.c | |
parent | 7f988eab57bd22884bbc452fb04c6c18738666b3 (diff) | |
download | linux-aeed9e82cd258b9699eaa6568efefba9cc6d5f01.tar.xz |
[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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | 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 6ba6ed2b480a..5106c2328d12 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); |