]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: factor skb freeing on xmit
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 1 Jun 2017 20:07:15 +0000 (16:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 21:34:56 +0000 (17:34 -0400)
commitea73d223068db923de2945d0c9c228277a8834d0
treea45ba1a54b080a3a71e4650f03d57ac3de3767e8
parent7c18b551506b9b468f4276fcb0bfae76f88ef550
net: dsa: factor skb freeing on xmit

As of e3e73829cdfa ("net: dsa: Factor bottom tag receive functions"),
the rcv caller frees the original SKB in case or error.

Be symmetric with that and make the xmit caller do the same.

At the same time, fix the checkpatch NULL comparison check:

        CHECK: Comparison to NULL could be written "!nskb"
    #208: FILE: net/dsa/tag_trailer.c:35:
    + if (nskb == NULL)

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c
net/dsa/tag_brcm.c
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c
net/dsa/tag_ksz.c
net/dsa/tag_lan9303.c
net/dsa/tag_mtk.c
net/dsa/tag_qca.c
net/dsa/tag_trailer.c