summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/cw1200/pm.c
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2013-12-31 18:33:57 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-01-03 15:37:01 -0500
commit47acf6f544314a383e2208bf0ba29528bb6302d2 (patch)
tree332a79df743ef4cc76cb2ccc8b4ce916dfb0244c /drivers/net/wireless/cw1200/pm.c
parent2c323058bcecb7d57610ebbcb85d4fa082d26c3b (diff)
downloadblackbird-op-linux-47acf6f544314a383e2208bf0ba29528bb6302d2.tar.gz
blackbird-op-linux-47acf6f544314a383e2208bf0ba29528bb6302d2.zip
wireless: cw1200: Fix memory leak in cw1200_wow_suspend()
Fix a memory leak in the cw1200_wow_suspend() error handling path. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/cw1200/pm.c')
-rw-r--r--drivers/net/wireless/cw1200/pm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/cw1200/pm.c b/drivers/net/wireless/cw1200/pm.c
index b37abb9f0453..6907c8fd4578 100644
--- a/drivers/net/wireless/cw1200/pm.c
+++ b/drivers/net/wireless/cw1200/pm.c
@@ -225,7 +225,7 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
cw1200_set_pm(priv, &priv->powersave_mode);
if (wait_event_interruptible_timeout(priv->ps_mode_switch_done,
!priv->ps_mode_switch_in_progress, 1*HZ) <= 0) {
- goto revert3;
+ goto revert4;
}
}
@@ -254,11 +254,11 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
/* Stop serving thread */
if (cw1200_bh_suspend(priv))
- goto revert4;
+ goto revert5;
ret = timer_pending(&priv->mcast_timeout);
if (ret)
- goto revert5;
+ goto revert6;
/* Store suspend state */
pm_state->suspend_state = state;
@@ -280,9 +280,9 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
return 0;
-revert5:
+revert6:
WARN_ON(cw1200_bh_resume(priv));
-revert4:
+revert5:
cw1200_resume_work(priv, &priv->bss_loss_work,
state->bss_loss_tmo);
cw1200_resume_work(priv, &priv->join_timeout,
@@ -291,6 +291,7 @@ revert4:
state->direct_probe);
cw1200_resume_work(priv, &priv->link_id_gc_work,
state->link_id_gc);
+revert4:
kfree(state);
revert3:
wsm_set_udp_port_filter(priv, &cw1200_udp_port_filter_off);
OpenPOWER on IntegriCloud