Skip to content

Commit

Permalink
iwlwifi: remove useless goto
Browse files Browse the repository at this point in the history
The patch removes some useless goto in code cleanup.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wu Fengguang authored and John W. Linville committed Dec 19, 2008
1 parent 95aa194 commit febf337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,24 +426,20 @@ static void iwl4965_nic_config(struct iwl_priv *priv)

static int iwl4965_apm_stop_master(struct iwl_priv *priv)
{
int ret = 0;
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);

/* set stop master bit */
iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);

ret = iwl_poll_direct_bit(priv, CSR_RESET,
iwl_poll_direct_bit(priv, CSR_RESET,
CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
if (ret < 0)
goto out;

out:
spin_unlock_irqrestore(&priv->lock, flags);
IWL_DEBUG_INFO("stop master\n");

return ret;
return 0;
}

static void iwl4965_apm_stop(struct iwl_priv *priv)
Expand Down
8 changes: 2 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,20 @@ static const u16 iwl5000_default_queue_to_tx_fifo[] = {
/* FIXME: same implementation as 4965 */
static int iwl5000_apm_stop_master(struct iwl_priv *priv)
{
int ret = 0;
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);

/* set stop master bit */
iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);

ret = iwl_poll_direct_bit(priv, CSR_RESET,
iwl_poll_direct_bit(priv, CSR_RESET,
CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
if (ret < 0)
goto out;

out:
spin_unlock_irqrestore(&priv->lock, flags);
IWL_DEBUG_INFO("stop master\n");

return ret;
return 0;
}


Expand Down

0 comments on commit febf337

Please sign in to comment.