diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b37e06722388..41277b6c0268 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1415,6 +1415,8 @@ static void tun_setup(struct net_device *dev) */ static int tun_validate(struct nlattr *tb[], struct nlattr *data[]) { + if (!data) + return 0; return -EINVAL; }