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)
commitbd372fe9c0f64ff6ea039f317b02c5f7c95e948e
treef52466d86bf71ef1ff1184f272b60b07804705a9
parentf17230e1aefe787d3ae59722e14506662abc99b8
cxgbe: fix Rx queue setup error management

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