Skip to content

Commit

Permalink
iwlwifi: Don't unlock priv->mutex if it isn't locked
Browse files Browse the repository at this point in the history
Commit b716bb9 ("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>
  • Loading branch information
Roland Dreier authored and John W. Linville committed Apr 24, 2008
1 parent 4d381ff commit 0997149
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0997149

Please sign in to comment.