diff options
author | Edward Cree <ecree@solarflare.com> | 2020-06-30 13:15:34 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-30 13:09:09 -0700 |
commit | c72ae701ee34385c9d4a17b59d127ca6a428300c (patch) | |
tree | f20e6a4149e05ec5d1644b285c0ca0314c70e614 /drivers/net/ethernet/sfc/nic_common.h | |
parent | f07cb4128abb2bbb69bdc7d37a3d69147cb13dcd (diff) |
sfc: don't call tx_remove if there isn't one
EF100 won't have an efx->type->tx_remove method, because there's
nothing for it to do. So make the call conditional.
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic_common.h')
-rw-r--r-- | drivers/net/ethernet/sfc/nic_common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h index 197ecac5e005..fd474d9e55e4 100644 --- a/drivers/net/ethernet/sfc/nic_common.h +++ b/drivers/net/ethernet/sfc/nic_common.h @@ -163,7 +163,8 @@ static inline void efx_nic_init_tx(struct efx_tx_queue *tx_queue) } static inline void efx_nic_remove_tx(struct efx_tx_queue *tx_queue) { - tx_queue->efx->type->tx_remove(tx_queue); + if (tx_queue->efx->type->tx_remove) + tx_queue->efx->type->tx_remove(tx_queue); } static inline void efx_nic_push_buffers(struct efx_tx_queue *tx_queue) { |