Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09971493 authored by Roland Dreier's avatar Roland Dreier Committed by John W. Linville
Browse files

iwlwifi: Don't unlock priv->mutex if it isn't locked



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: default avatarRoland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4d381ffb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}

+0 −1
Original line number Diff line number Diff line
@@ -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;
	}