Browse Source

macvtap: fix uninitialized return value macvtap_ioctl_set_queue()

Return -EINVAL on illegal flag instead of uninitialized value. This fixes the
kbuild test warning.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jason Wang 12 years ago
parent
commit
f57855a54f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/net/macvtap.c

+ 2 - 0
drivers/net/macvtap.c

@@ -969,6 +969,8 @@ static int macvtap_ioctl_set_queue(struct file *file, unsigned int flags)
 		ret = macvtap_enable_queue(vlan->dev, file, q);
 	else if (flags & IFF_DETACH_QUEUE)
 		ret = macvtap_disable_queue(q);
+	else
+		ret = -EINVAL;
 
 	macvtap_put_vlan(vlan);
 	return ret;