Skip to content

Commit

Permalink
net: ipv6: fix wrong ping_v6_sendmsg return value
Browse files Browse the repository at this point in the history
ping_v6_sendmsg currently returns 0 on success. It should return
the number of bytes written instead.

Signed-off-by: Lorenzo Colitti <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lcolitti authored and davem330 committed Jul 4, 2013
1 parent a1bdc45 commit fbfe80c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/ipv6/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbfe80c

Please sign in to comment.