aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-12-17 03:52:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:23:38 -0500
commitfebf3370c63b4ea7fc1cedb9a73ac37e3cb21079 (patch)
treeac77df5fc8aafbd23c92016cc229b7216acce6b9
parent95aa194ac4a8fee0aea64c9609e70211cd057ad2 (diff)
iwlwifi: remove useless goto
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>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 3a78d860631d..5a72bc0377de 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -426,7 +426,6 @@ static void iwl4965_nic_config(struct iwl_priv *priv)
426 426
427static int iwl4965_apm_stop_master(struct iwl_priv *priv) 427static int iwl4965_apm_stop_master(struct iwl_priv *priv)
428{ 428{
429 int ret = 0;
430 unsigned long flags; 429 unsigned long flags;
431 430
432 spin_lock_irqsave(&priv->lock, flags); 431 spin_lock_irqsave(&priv->lock, flags);
@@ -434,16 +433,13 @@ static int iwl4965_apm_stop_master(struct iwl_priv *priv)
434 /* set stop master bit */ 433 /* set stop master bit */
435 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); 434 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
436 435
437 ret = iwl_poll_direct_bit(priv, CSR_RESET, 436 iwl_poll_direct_bit(priv, CSR_RESET,
438 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); 437 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
439 if (ret < 0)
440 goto out;
441 438
442out:
443 spin_unlock_irqrestore(&priv->lock, flags); 439 spin_unlock_irqrestore(&priv->lock, flags);
444 IWL_DEBUG_INFO("stop master\n"); 440 IWL_DEBUG_INFO("stop master\n");
445 441
446 return ret; 442 return 0;
447} 443}
448 444
449static void iwl4965_apm_stop(struct iwl_priv *priv) 445static void iwl4965_apm_stop(struct iwl_priv *priv)
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 7f3a921a15c6..66d053d28a74 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -73,7 +73,6 @@ static const u16 iwl5000_default_queue_to_tx_fifo[] = {
73/* FIXME: same implementation as 4965 */ 73/* FIXME: same implementation as 4965 */
74static int iwl5000_apm_stop_master(struct iwl_priv *priv) 74static int iwl5000_apm_stop_master(struct iwl_priv *priv)
75{ 75{
76 int ret = 0;
77 unsigned long flags; 76 unsigned long flags;
78 77
79 spin_lock_irqsave(&priv->lock, flags); 78 spin_lock_irqsave(&priv->lock, flags);
@@ -81,16 +80,13 @@ static int iwl5000_apm_stop_master(struct iwl_priv *priv)
81 /* set stop master bit */ 80 /* set stop master bit */
82 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); 81 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
83 82
84 ret = iwl_poll_direct_bit(priv, CSR_RESET, 83 iwl_poll_direct_bit(priv, CSR_RESET,
85 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); 84 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
86 if (ret < 0)
87 goto out;
88 85
89out:
90 spin_unlock_irqrestore(&priv->lock, flags); 86 spin_unlock_irqrestore(&priv->lock, flags);
91 IWL_DEBUG_INFO("stop master\n"); 87 IWL_DEBUG_INFO("stop master\n");
92 88
93 return ret; 89 return 0;
94} 90}
95 91
96 92