Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);