summaryrefslogtreecommitdiff
path: root/net/ipv6/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ping.c')
-rw-r--r--net/ipv6/ping.c5
1 files changed, 4 insertions, 1 deletions
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