mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
[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>
This commit is contained in:
parent
7f988eab57
commit
aeed9e82cd
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue