diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-04-22 09:56:00 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-04-22 09:56:00 +0200 |
commit | f70925bf99406150d8133e775e49c9c459f78733 (patch) | |
tree | 392dd3854bf229c0c94b481819e4a67551ba6895 /net/packet | |
parent | 9c8774e629a1950c24b44e3c8fb93d76fb644b49 (diff) | |
parent | 59f0c2447e2553b0918b4a9fd38763a5c0587d02 (diff) | |
download | linux-f70925bf99406150d8133e775e49c9c459f78733.tar.gz linux-f70925bf99406150d8133e775e49c9c459f78733.tar.bz2 linux-f70925bf99406150d8133e775e49c9c459f78733.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
d08ed852560e ("net: lan966x: Make sure to release ptp interrupt")
c8349639324a ("net: lan966x: Add FDMA functionality")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index d3caaf4d4b3e..243566129784 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -2858,8 +2858,9 @@ tpacket_error: status = TP_STATUS_SEND_REQUEST; err = po->xmit(skb); - if (unlikely(err > 0)) { - err = net_xmit_errno(err); + if (unlikely(err != 0)) { + if (err > 0) + err = net_xmit_errno(err); if (err && __packet_get_status(po, ph) == TP_STATUS_AVAILABLE) { /* skb was destructed already */ @@ -3060,8 +3061,12 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len) skb->no_fcs = 1; err = po->xmit(skb); - if (err > 0 && (err = net_xmit_errno(err)) != 0) - goto out_unlock; + if (unlikely(err != 0)) { + if (err > 0) + err = net_xmit_errno(err); + if (err) + goto out_unlock; + } dev_put(dev); |