summaryrefslogtreecommitdiff
path: root/net/mpls
diff options
context:
space:
mode:
Diffstat (limited to 'net/mpls')
-rw-r--r--net/mpls/af_mpls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index d93c0301ad23..04306989d054 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -411,6 +411,9 @@ static struct net_device *find_outdev(struct net *net,
dev = dev_get_by_index(net, cfg->rc_ifindex);
}
+ if (!dev)
+ return ERR_PTR(-ENODEV);
+
return dev;
}