2010-05-08 16:21:18

by Dan Carpenter

[permalink] [raw]
Subject: [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.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 9dad867..3faa78c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -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;
}



2010-05-11 01:19:30

by Zhu Yi

[permalink] [raw]
Subject: Re: [patch 1/9] iwlwifi: remove stray mutex_unlock()

On Sun, 2010-05-09 at 00:21 +0800, Dan Carpenter wrote:
> This mutex_unlock() has been here from the initial commit, but as nearly
> as I can tell, there isn't a reason for it.
>
> Signed-off-by: Dan Carpenter <[email protected]>
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
> index 9dad867..3faa78c 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-3945.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
> @@ -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.

Acked-by: Zhu Yi <[email protected]>

Thanks,
-yi