aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index abf6352f990f..5b77bdaa57dd 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1056,10 +1056,9 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1056 if (!in_dev) { 1056 if (!in_dev) {
1057 if (event == NETDEV_REGISTER) { 1057 if (event == NETDEV_REGISTER) {
1058 in_dev = inetdev_init(dev); 1058 in_dev = inetdev_init(dev);
1059 if (!in_dev)
1060 return notifier_from_errno(-ENOMEM);
1059 if (dev == &loopback_dev) { 1061 if (dev == &loopback_dev) {
1060 if (!in_dev)
1061 panic("devinet: "
1062 "Failed to create loopback\n");
1063 IN_DEV_CONF_SET(in_dev, NOXFRM, 1); 1062 IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
1064 IN_DEV_CONF_SET(in_dev, NOPOLICY, 1); 1063 IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
1065 } 1064 }