]> git.droids-corp.org - dpdk.git/commitdiff
cxgbe: fix Rx queue setup error management
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 11 Dec 2015 08:25:30 +0000 (13:55 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 12 Dec 2015 21:34:43 +0000 (22:34 +0100)
When refilling freelists for the first time and if it fails, the rxq
is freed and returns ENOMEM. There is a check while freeing hardware rxq
to pass freelist context id if the freelist exists or 0xffff otherwise.
The error path is only reached if freelist exists. So, fix is to remove
the useless check for freelist existence.

Coverity issue: 107108
Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")
Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
drivers/net/cxgbe/sge.c

index 51449e00a0ddc886be25a13d7e2ae0f0fb1557c4..3c62d03e17b665c263a212af2f4431fb59b50885 100644 (file)
@@ -1823,7 +1823,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 
 refill_fl_err:
        t4_iq_free(adap, adap->mbox, adap->pf, 0, FW_IQ_TYPE_FL_INT_CAP,
-                  iq->cntxt_id, fl ? fl->cntxt_id : 0xffff, 0xffff);
+                  iq->cntxt_id, fl->cntxt_id, 0xffff);
 fl_nomem:
        ret = -ENOMEM;
 err: