wlcore: unlock on error in wl1271_op_suspend()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 15 Jan 2015 11:43:40 +0000 (14:43 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 23 Jan 2015 17:37:42 +0000 (19:37 +0200)
We recently introduced a new error path which needs an unlock.

Fixes: 6d5a748d4836 ('wlcore: add ability to reduce FW interrupts during suspend')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/main.c

index 0a9d9a1b2d85162bef2dad42694249adb575c9ff..1e136993580f104a156fd3c72494dee9b3845a9b 100644 (file)
@@ -1785,8 +1785,10 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
        mutex_lock(&wl->mutex);
 
        ret = wl1271_ps_elp_wakeup(wl);
-       if (ret < 0)
+       if (ret < 0) {
+               mutex_unlock(&wl->mutex);
                return ret;
+       }
 
        wl->wow_enabled = true;
        wl12xx_for_each_wlvif(wl, wlvif) {