sfc/siena: fix null pointer dereference in efx_hard_start_xmit

Like in previous patch for sfc, prevent potential (but unlikely) NULL
pointer dereference.

Fixes: 12804793b1 ("sfc: decouple TXQ type from label")
Reported-by: Tianhao Zhao <tizhao@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Link: https://lore.kernel.org/r/20220915141958.16458-1-ihuguet@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Íñigo Huguet 2022-09-15 16:19:58 +02:00 committed by Jakub Kicinski
parent 974bb793ad
commit 589c6eded1
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ netdev_tx_t efx_siena_hard_start_xmit(struct sk_buff *skb,
* previous packets out. * previous packets out.
*/ */
if (!netdev_xmit_more()) if (!netdev_xmit_more())
efx_tx_send_pending(tx_queue->channel); efx_tx_send_pending(efx_get_tx_channel(efx, index));
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }