From cd840f6a0d6522e37c49def0eabb1e2134b68f1d Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 16 Apr 2012 13:57:02 +0300 Subject: [PATCH] wlcore: release lock on error in wl1271_op_suspend() We should release this lock before returning. Signed-off-by: Dan Carpenter Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 4347de6784d8..6cd09646d6ed 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/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) { ret = wl1271_configure_suspend(wl, wlvif, wow); if (ret < 0) { + mutex_unlock(&wl->mutex); wl1271_warning("couldn't prepare device to suspend"); return ret; } -- 2.39.5