From: Lorenzo Colitti Date: Wed, 3 Jul 2013 15:12:40 +0000 (+0900) Subject: net: ipv6: fix wrong ping_v6_sendmsg return value X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fbfe80c890a1dc521d0b629b870e32fcffff0da5;p=linux-beck.git net: ipv6: fix wrong ping_v6_sendmsg return value ping_v6_sendmsg currently returns 0 on success. It should return the number of bytes written instead. Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index 10b975577e91..18f19df4189f 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -191,7 +191,10 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } release_sock(sk); - return err; + if (err) + return err; + + return len; } #ifdef CONFIG_PROC_FS