浏览代码

wlcore: release lock on error in wl1271_op_suspend()

We should release this lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Dan Carpenter 13 年之前
父节点
当前提交
cd840f6a0d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/wireless/ti/wlcore/main.c

+ 1 - 0
drivers/net/wireless/ti/wlcore/main.c

@@ -1629,6 +1629,7 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
 	wl12xx_for_each_wlvif(wl, wlvif) {
 	wl12xx_for_each_wlvif(wl, wlvif) {
 		ret = wl1271_configure_suspend(wl, wlvif, wow);
 		ret = wl1271_configure_suspend(wl, wlvif, wow);
 		if (ret < 0) {
 		if (ret < 0) {
+			mutex_unlock(&wl->mutex);
 			wl1271_warning("couldn't prepare device to suspend");
 			wl1271_warning("couldn't prepare device to suspend");
 			return ret;
 			return ret;
 		}
 		}