aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-05 12:41:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:51:35 -0400
commit08960dea6c736280a03cb947f445fdb94fdaa2ee (patch)
treef7ffa6d8705a09d0c89d50b24c85b5744a2d3434 /drivers/net/wireless
parent4de10b188070b1b96743b1b912843af729ebe50f (diff)
iwlagn: remove pointless return variables
A number of places just use a variable to return it right away, which is useless, so let's remove the variables there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c7
3 files changed, 5 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index e394e49228ba..97abc10f4f22 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2771,16 +2771,13 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2771static void *rs_alloc_sta(void *priv_rate, struct ieee80211_sta *sta, 2771static void *rs_alloc_sta(void *priv_rate, struct ieee80211_sta *sta,
2772 gfp_t gfp) 2772 gfp_t gfp)
2773{ 2773{
2774 struct iwl_lq_sta *lq_sta;
2775 struct iwl_station_priv *sta_priv = (struct iwl_station_priv *) sta->drv_priv; 2774 struct iwl_station_priv *sta_priv = (struct iwl_station_priv *) sta->drv_priv;
2776 struct iwl_priv *priv; 2775 struct iwl_priv *priv;
2777 2776
2778 priv = (struct iwl_priv *)priv_rate; 2777 priv = (struct iwl_priv *)priv_rate;
2779 IWL_DEBUG_RATE(priv, "create station rate scale window\n"); 2778 IWL_DEBUG_RATE(priv, "create station rate scale window\n");
2780 2779
2781 lq_sta = &sta_priv->lq_sta; 2780 return &sta_priv->lq_sta;
2782
2783 return lq_sta;
2784} 2781}
2785 2782
2786/* 2783/*
@@ -3259,7 +3256,6 @@ static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file,
3259{ 3256{
3260 char buff[120]; 3257 char buff[120];
3261 int desc = 0; 3258 int desc = 0;
3262 ssize_t ret;
3263 3259
3264 struct iwl_lq_sta *lq_sta = file->private_data; 3260 struct iwl_lq_sta *lq_sta = file->private_data;
3265 struct iwl_priv *priv; 3261 struct iwl_priv *priv;
@@ -3276,8 +3272,7 @@ static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file,
3276 "Bit Rate= %d Mb/s\n", 3272 "Bit Rate= %d Mb/s\n",
3277 iwl_rates[lq_sta->last_txrate_idx].ieee >> 1); 3273 iwl_rates[lq_sta->last_txrate_idx].ieee >> 1);
3278 3274
3279 ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc); 3275 return simple_read_from_buffer(user_buf, count, ppos, buff, desc);
3280 return ret;
3281} 3276}
3282 3277
3283static const struct file_operations rs_sta_dbgfs_rate_scale_data_ops = { 3278static const struct file_operations rs_sta_dbgfs_rate_scale_data_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index 5d35e3504516..bb262a60e816 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -653,7 +653,5 @@ int iwl_verify_ucode(struct iwl_priv *priv)
653 * Selection of bootstrap image (vs. other images) is arbitrary. */ 653 * Selection of bootstrap image (vs. other images) is arbitrary. */
654 image = (__le32 *)priv->ucode_boot.v_addr; 654 image = (__le32 *)priv->ucode_boot.v_addr;
655 len = priv->ucode_boot.len; 655 len = priv->ucode_boot.len;
656 ret = iwl_verify_inst_full(priv, image, len); 656 return iwl_verify_inst_full(priv, image, len);
657
658 return ret;
659} 657}
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 8842411f1cf3..90f2b6464bc1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1572,12 +1572,10 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file,
1572 int pos = 0; 1572 int pos = 0;
1573 char buf[200]; 1573 char buf[200];
1574 const size_t bufsz = sizeof(buf); 1574 const size_t bufsz = sizeof(buf);
1575 ssize_t ret;
1576 1575
1577 if (!priv->bt_enable_flag) { 1576 if (!priv->bt_enable_flag) {
1578 pos += scnprintf(buf + pos, bufsz - pos, "BT coex disabled\n"); 1577 pos += scnprintf(buf + pos, bufsz - pos, "BT coex disabled\n");
1579 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); 1578 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1580 return ret;
1581 } 1579 }
1582 pos += scnprintf(buf + pos, bufsz - pos, "BT enable flag: 0x%x\n", 1580 pos += scnprintf(buf + pos, bufsz - pos, "BT enable flag: 0x%x\n",
1583 priv->bt_enable_flag); 1581 priv->bt_enable_flag);
@@ -1608,8 +1606,7 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file,
1608 break; 1606 break;
1609 } 1607 }
1610 1608
1611 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); 1609 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1612 return ret;
1613} 1610}
1614 1611
1615static ssize_t iwl_dbgfs_protection_mode_read(struct file *file, 1612static ssize_t iwl_dbgfs_protection_mode_read(struct file *file,