nfp: validate the return code from dev_queue_xmit()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 27 Mar 2019 18:38:38 +0000 (11:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2019 00:04:29 +0000 (17:04 -0700)
commitc8ba5b91a04e3e2643e48501c114108802f21cda
tree8390e791b4f606c2876adb0e836a52850926745a
parent355b98553789b646ed97ad801a619ff898471b92
nfp: validate the return code from dev_queue_xmit()

dev_queue_xmit() may return error codes as well as netdev_tx_t,
and it always consumes the skb.  Make sure we always return a
correct netdev_tx_t value.

Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c