From: Edward Cree Date: Tue, 30 Jun 2020 12:15:34 +0000 (+0100) Subject: sfc: don't call tx_remove if there isn't one X-Git-Tag: v5.15~3197^2~381^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c72ae701ee34385c9d4a17b59d127ca6a428300c;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h index 197ecac..fd474d9 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) {