ath6kl: unlock if ath6kl_cfg80211_connect() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 18 Nov 2011 14:09:32 +0000 (17:09 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 21 Nov 2011 17:47:08 +0000 (19:47 +0200)
There is an unlock missing on this error path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c

index 3795686f6e2a2e57c86870f3fcea351585195296..364f7884a3d37dd72396bcee286a993ec8e963ea 100644 (file)
@@ -427,8 +427,10 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 
        if (sme->ie && (sme->ie_len > 0)) {
                status = ath6kl_set_assoc_req_ies(vif, sme->ie, sme->ie_len);
-               if (status)
+               if (status) {
+                       up(&ar->sem);
                        return status;
+               }
        } else
                ar->connect_ctrl_flags &= ~CONNECT_WPS_FLAG;