Skip to content

Commit 237bb5f

Browse files
Mikhail Lobanovdavem330
authored andcommitted
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: ab677ff ("cxgb4: Allocate Tx queues dynamically") Signed-off-by: Mikhail Lobanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 19c5c04 commit 237bb5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ free_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info)
406406
for (i = 0; i < nq; i++) {
407407
struct sge_uld_txq *txq = &txq_info->uldtxq[i];
408408

409-
if (txq && txq->q.desc) {
409+
if (txq->q.desc) {
410410
tasklet_kill(&txq->qresume_tsk);
411411
t4_ofld_eq_free(adap, adap->mbox, adap->pf, 0,
412412
txq->q.cntxt_id);

0 commit comments

Comments
 (0)