Commit f57855a5 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

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: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9a90a31
...@@ -969,6 +969,8 @@ static int macvtap_ioctl_set_queue(struct file *file, unsigned int flags) ...@@ -969,6 +969,8 @@ static int macvtap_ioctl_set_queue(struct file *file, unsigned int flags)
ret = macvtap_enable_queue(vlan->dev, file, q); ret = macvtap_enable_queue(vlan->dev, file, q);
else if (flags & IFF_DETACH_QUEUE) else if (flags & IFF_DETACH_QUEUE)
ret = macvtap_disable_queue(q); ret = macvtap_disable_queue(q);
else
ret = -EINVAL;
macvtap_put_vlan(vlan); macvtap_put_vlan(vlan);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment