From: Wei Yongjun Date: Fri, 12 Apr 2013 03:17:12 +0000 (+0000) Subject: tuntap: fix error return code in tun_set_iff() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3be8fbab18fbc06b6ff94a56f9c225e29ea64a73;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git tuntap: fix error return code in tun_set_iff() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. [ Bug added in linux-3.8 , commit 4008e97f866db665 ("tuntap: fix ambigious multiqueue API") ] Signed-off-by: Wei Yongjun Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b7c457adc0dc..729ed533bb33 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1594,7 +1594,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) if (tun->flags & TUN_TAP_MQ && (tun->numqueues + tun->numdisabled > 1)) - return err; + return -EBUSY; } else { char *name;