wlcore: release lock on error in wl1271_op_suspend()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 16 Apr 2012 10:57:02 +0000 (13:57 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 May 2012 21:53:24 +0000 (17:53 -0400)
We should release this lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/main.c

index 4347de6..6cd0964 100644 (file)
@@ -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;
                }