From: Jason Wang Date: Thu, 13 Jun 2013 06:23:36 +0000 (+0800) Subject: macvtap: fix uninitialized return value macvtap_ioctl_set_queue() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f57855a54fb1e7529b32821f021d351e01dcfe39;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- 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) 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;