There is no point in copying the structure from userspace or looking up
a device if SIT support is not disabled and we'll eventually return
-ENODEV anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
struct net_device *dev;
int err = -EINVAL;
+ if (!IS_ENABLED(CONFIG_IPV6_SIT))
+ return -ENODEV;
+
rtnl_lock();
err = -EFAULT;
if (!dev)
goto err_exit;
-#if IS_ENABLED(CONFIG_IPV6_SIT)
if (dev->type == ARPHRD_SIT) {
const struct net_device_ops *ops = dev->netdev_ops;
struct ifreq ifr;
err = dev_open(dev, NULL);
}
}
-#endif
err_exit:
rtnl_unlock();