net: sock: make sock_tx_timestamp void
Currently, sock_tx_timestamp() always returns 0. The comment that
describes the sock_tx_timestamp() function wrongly says that it
returns an error when an invalid argument is passed (from commit
20d4947353
, ``net: socket infrastructure for SO_TIMESTAMPING'').
Make the function void, so that we can also remove all the unneeded
if conditions that check for such a _non-existant_ error case in the
output path.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9d9f163c82
commit
bf84a01063
@@ -711,9 +711,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
|
||||
err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size);
|
||||
if (err < 0)
|
||||
goto free_skb;
|
||||
err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
|
||||
if (err < 0)
|
||||
goto free_skb;
|
||||
|
||||
sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
|
||||
|
||||
skb->dev = dev;
|
||||
skb->sk = sk;
|
||||
|
Reference in New Issue
Block a user