diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-04-14 10:08:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-14 21:41:49 +0200 |
commit | bf84a01063eaab2f1a37d72d1b903445b3a25a4e (patch) | |
tree | fea0862757422b93ee4f158bf2a6f855a605d5b9 /net/packet/af_packet.c | |
parent | vxlan: use htonl when snooping for loopback address (diff) | |
download | linux-bf84a01063eaab2f1a37d72d1b903445b3a25a4e.tar.xz linux-bf84a01063eaab2f1a37d72d1b903445b3a25a4e.zip |
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
20d4947353be, ``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>
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r-- | net/packet/af_packet.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 8e4644ff8d34..77d71f84758c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1505,9 +1505,8 @@ retry: skb->dev = dev; skb->priority = sk->sk_priority; skb->mark = sk->sk_mark; - err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); - if (err < 0) - goto out_unlock; + + sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); if (unlikely(extra_len == 4)) skb->no_fcs = 1; @@ -2312,9 +2311,8 @@ static int packet_snd(struct socket *sock, err = skb_copy_datagram_from_iovec(skb, offset, msg->msg_iov, 0, len); if (err) goto out_free; - err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); - if (err < 0) - goto out_free; + + sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); if (!gso_type && (len > dev->mtu + reserve + extra_len)) { /* Earlier code assumed this would be a VLAN pkt, |