Skip to contentSkip to conversation

wlcore: release lock on error in wl1271_op_suspend()

PATCH Applied Dan Carpenter 2 participants 2 messages Apr 16, 2012 – May 3, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wlcore: release lock on error in wl1271_op_suspend()

We should release this lock before returning.

drivers/net/wireless/ti/wlcore/main.c +1 -0
index 2b0f987..23fc0d2 100644
@@ -1364,6 +1364,7 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
 	wl12xx_for_each_wlvif(wl, wlvif) {
 		ret = wl1271_configure_suspend(wl, wlvif);
 		if (ret < 0) {
+			mutex_unlock(&wl->mutex);
 			wl1271_warning("couldn't prepare device to suspend");
 			return ret;
 		}