Skip to content

Commit

Permalink
macvtap: fix uninitialized return value macvtap_ioctl_set_queue()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jason Wang authored and David S. Miller committed Jun 13, 2013
1 parent d9a90a3 commit f57855a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f57855a

Please sign in to comment.