From: Dan Carpenter Date: Thu, 15 Jan 2015 11:43:40 +0000 (+0300) Subject: wlcore: unlock on error in wl1271_op_suspend() X-Git-Tag: Ubuntu-5.2.0-15.16~11945^2~130^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bcb514413e3b0f4d7e40b2f97bbb83a57e09f657;p=mirror_ubuntu-eoan-kernel.git wlcore: unlock on error in wl1271_op_suspend() 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 0a9d9a1b2d85..1e136993580f 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -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) {