--- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3617,8 +3617,10 @@ static int __vxlan_dev_create(struct net if (dst->remote_ifindex) { remote_dev = __dev_get_by_index(net, dst->remote_ifindex); - if (!remote_dev) + if (!remote_dev) { + err = -ENODEV; goto errout; + } err = netdev_upper_dev_link(remote_dev, dev, extack); if (err)