Skip to contentSkip to conversation

iwlwifi: remove stray mutex_unlock()

PATCH In review Dan Carpenter 2 participants 2 messages May 8, 2010 – May 11, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 iwlwifi: remove stray mutex_unlock()

This mutex_unlock() has been here from the initial commit, but as nearly as I can tell, there isn't a reason for it.

drivers/net/wireless/iwlwifi/iwl-3945.c +0 -1
index 9dad867..3faa78c 100644
@@ -2482,7 +2482,6 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
 				   &priv->_3945.shared_phys, GFP_KERNEL);
 	if (!priv->_3945.shared_virt) {
 		IWL_ERR(priv, "failed to allocate pci memory\n");
-		mutex_unlock(&priv->mutex);
 		return -ENOMEM;
 	}
 
Acked-by on v1 1/9
#1 lore raw
Quoted 10 lines · Dan Carpenter

This mutex_unlock() has been here from the initial commit, but as nearly as I can tell, there isn't a reason for it.

drivers/net/wireless/iwlwifi/iwl-3945.c +0 -0
index 9dad867..3faa78c 100644

drivers/net/wireless/iwlwifi/iwl-3945.c int iwl3945_hw_set_hw_params(struct iwl_priv *priv) · line 2486

Quoted 6 lines
drivers/net/wireless/iwlwifi/iwl-3945.c +0 -1
@@ -2482,7 +2482,6 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
 				   &priv->_3945.shared_phys, GFP_KERNEL);
 	if (!priv->_3945.shared_virt) {
 		IWL_ERR(priv, "failed to allocate pci memory\n");
-		mutex_unlock(&priv->mutex);
 		return -ENOMEM;
 	}

Yeah, a mistake, definitely.

Thanks,
-yi