]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
iwlwifi: Don't unlock priv->mutex if it isn't locked
authorRoland Dreier <rdreier@cisco.com>
Wed, 23 Apr 2008 23:22:13 +0000 (16:22 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 24 Apr 2008 01:25:36 +0000 (21:25 -0400)
Commit b716bb91 ("iwlwifi: Cancel scanning upon association") moved the
test of priv->vif in iwl{3945,4964}_mac_config_interface() outside of
where priv->mutex is held, but still tries to do mutex_unlock() on
return.  This is clearly wrong and triggers a nasty lockdep warning when
this codepath is triggered.  Fix this by removing the mutex_unlock().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 1a5678fe4224de0975592a9edc0f71a75a42fbf5..a1a0b3c581f1d469abbcc913b22f9a02b2be2f25 100644 (file)
@@ -6907,7 +6907,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
 
        if (priv->vif != vif) {
                IWL_DEBUG_MAC80211("leave - priv->vif != vif\n");
-               mutex_unlock(&priv->mutex);
                return 0;
        }
 
index d7e2358a213a1a32d5b7dadd084ae34daeed200a..d0bbcaaeb94c8a8d30a42e5f6bc5c488c861e6ee 100644 (file)
@@ -6473,7 +6473,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
 
        if (priv->vif != vif) {
                IWL_DEBUG_MAC80211("leave - priv->vif != vif\n");
-               mutex_unlock(&priv->mutex);
                return 0;
        }