cxgb4: avoid duplicating some resource freeing code

Currently there are two copies of some resource freeing code, turn it into
a function and call it.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 file changed