Commit aeed9e82 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7f988eab
...@@ -229,7 +229,12 @@ struct net_device loopback_dev = { ...@@ -229,7 +229,12 @@ struct net_device loopback_dev = {
/* Setup and register the loopback device. */ /* Setup and register the loopback device. */
static int __init loopback_init(void) 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); module_init(loopback_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment