Skip to content

Commit

Permalink
sfc: don't call tx_remove if there isn't one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Edward Cree authored and David S. Miller committed Jun 30, 2020
1 parent f07cb41 commit c72ae70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/sfc/nic_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit c72ae70

Please sign in to comment.