mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
cxgb4: unnecessary check for 0 in the free_sge_txq_uld() function
The free_sge_txq_old() function has an unnecessary txq check of 0.
This check is not necessary, since the txq pointer is initialized by the
uldtxq[i] address from the operation &txq_info->uldtxq[i], which ensures
that txq is not equal to 0.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: ab677ff4ad ("cxgb4: Allocate Tx queues dynamically")
Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
19c5c04d31
commit
237bb5f7f7
@@ -406,7 +406,7 @@ free_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info)
|
||||
for (i = 0; i < nq; i++) {
|
||||
struct sge_uld_txq *txq = &txq_info->uldtxq[i];
|
||||
|
||||
if (txq && txq->q.desc) {
|
||||
if (txq->q.desc) {
|
||||
tasklet_kill(&txq->qresume_tsk);
|
||||
t4_ofld_eq_free(adap, adap->mbox, adap->pf, 0,
|
||||
txq->q.cntxt_id);
|
||||
|
||||
Reference in New Issue
Block a user