aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvtap.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-06-13 02:23:36 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-13 04:23:11 -0400
commitf57855a54fb1e7529b32821f021d351e01dcfe39 (patch)
tree554fe77ad908c8ae1de1ebbd43e5a4daf295a92b /drivers/net/macvtap.c
parentd9a90a3105eb6ca89aab74223e6526ab4a5e44b5 (diff)
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>
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r--drivers/net/macvtap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index edcbf1c0d6ed..5a76f20776af 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -969,6 +969,8 @@ static int macvtap_ioctl_set_queue(struct file *file, unsigned int flags)
969 ret = macvtap_enable_queue(vlan->dev, file, q); 969 ret = macvtap_enable_queue(vlan->dev, file, q);
970 else if (flags & IFF_DETACH_QUEUE) 970 else if (flags & IFF_DETACH_QUEUE)
971 ret = macvtap_disable_queue(q); 971 ret = macvtap_disable_queue(q);
972 else
973 ret = -EINVAL;
972 974
973 macvtap_put_vlan(vlan); 975 macvtap_put_vlan(vlan);
974 return ret; 976 return ret;