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

Commit febf3370 authored by Wu Fengguang's avatar Wu Fengguang Committed by John W. Linville
Browse files

iwlwifi: remove useless goto



The patch removes some useless goto in code cleanup.

Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 95aa194a
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -426,7 +426,6 @@ static void iwl4965_nic_config(struct iwl_priv *priv)


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


	spin_lock_irqsave(&priv->lock, flags);
	spin_lock_irqsave(&priv->lock, flags);
@@ -434,16 +433,13 @@ static int iwl4965_apm_stop_master(struct iwl_priv *priv)
	/* set stop master bit */
	/* set stop master bit */
	iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
	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);
			CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
	if (ret < 0)
		goto out;


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


	return ret;
	return 0;
}
}


static void iwl4965_apm_stop(struct iwl_priv *priv)
static void iwl4965_apm_stop(struct iwl_priv *priv)
+2 −6
Original line number Original line Diff line number Diff line
@@ -73,7 +73,6 @@ static const u16 iwl5000_default_queue_to_tx_fifo[] = {
/* FIXME: same implementation as 4965 */
/* FIXME: same implementation as 4965 */
static int iwl5000_apm_stop_master(struct iwl_priv *priv)
static int iwl5000_apm_stop_master(struct iwl_priv *priv)
{
{
	int ret = 0;
	unsigned long flags;
	unsigned long flags;


	spin_lock_irqsave(&priv->lock, flags);
	spin_lock_irqsave(&priv->lock, flags);
@@ -81,16 +80,13 @@ static int iwl5000_apm_stop_master(struct iwl_priv *priv)
	/* set stop master bit */
	/* set stop master bit */
	iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
	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);
				  CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
	if (ret < 0)
		goto out;


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


	return ret;
	return 0;
}
}