aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-07-30 19:37:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-31 05:28:14 -0400
commitaeed9e82cd258b9699eaa6568efefba9cc6d5f01 (patch)
tree0a3cd08162e6c7b11a7fde452877571b48559620 /drivers/net
parent7f988eab57bd22884bbc452fb04c6c18738666b3 (diff)
[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')
-rw-r--r--drivers/net/loopback.c7
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 = {
229/* Setup and register the loopback device. */ 229/* Setup and register the loopback device. */
230static int __init loopback_init(void) 230static int __init loopback_init(void)
231{ 231{
232 return register_netdev(&loopback_dev); 232 int err = register_netdev(&loopback_dev);
233
234 if (err)
235 panic("loopback: Failed to register netdevice: %d\n", err);
236
237 return err;
233}; 238};
234 239
235module_init(loopback_init); 240module_init(loopback_init);