summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRaju Rangoju <rajur@chelsio.com>2020-09-16 21:50:39 +0530
committerDavid S. Miller <davem@davemloft.net>2020-09-17 16:29:20 -0700
commitf4a26a9b311d7ff9db461278faf2869d06496ef8 (patch)
tree6541e23916fb3f94b64f518fe7fb540cca7c0126 /drivers
parent44144185951a0ff9b50bf21c0cd1f79ff688e5ca (diff)
downloadlinux-f4a26a9b311d7ff9db461278faf2869d06496ef8.tar.bz2
cxgb4: fix memory leak during module unload
Fix the memory leak in mps during module unload path by freeing mps reference entries if the list adpter->mps_ref is not already empty Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting") Signed-off-by: Raju Rangoju <rajur@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
index b1a073eea60b..a020e8490681 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c
@@ -229,7 +229,7 @@ void cxgb4_free_mps_ref_entries(struct adapter *adap)
{
struct mps_entries_ref *mps_entry, *tmp;
- if (!list_empty(&adap->mps_ref))
+ if (list_empty(&adap->mps_ref))
return;
spin_lock(&adap->mps_ref_lock);