Commit 1c948eaa authored by Sanjana Sanikommu's avatar Sanjana Sanikommu Committed by Greg Kroah-Hartman

staging: rtlwifi: Remove return variable.

Remove return variable and return "return" value directly. Issue found by
Coccinelle using ret.cocci.
Signed-off-by: default avatarSanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04127372
...@@ -219,10 +219,8 @@ bool rtl8822be_halmac_cb_init_bb_rf_register(struct rtl_priv *rtlpriv) ...@@ -219,10 +219,8 @@ bool rtl8822be_halmac_cb_init_bb_rf_register(struct rtl_priv *rtlpriv)
txpath = RF_MASK_A | RF_MASK_B; txpath = RF_MASK_A | RF_MASK_B;
rxpath = RF_MASK_A | RF_MASK_B; rxpath = RF_MASK_A | RF_MASK_B;
tx2path = false; tx2path = false;
ret = rtlpriv->phydm.ops->phydm_trx_mode(rtlpriv, txpath, rxpath, return rtlpriv->phydm.ops->phydm_trx_mode(rtlpriv, txpath, rxpath,
tx2path); tx2path);
return ret;
} }
static void _rtl8822be_phy_init_tx_power_by_rate(struct ieee80211_hw *hw) static void _rtl8822be_phy_init_tx_power_by_rate(struct ieee80211_hw *hw)
...@@ -1580,11 +1578,9 @@ _rtl8822be_phy_get_txpower_by_rate(struct ieee80211_hw *hw, u8 band, u8 path, ...@@ -1580,11 +1578,9 @@ _rtl8822be_phy_get_txpower_by_rate(struct ieee80211_hw *hw, u8 band, u8 path,
else else
tx_num = RF_1TX; tx_num = RF_1TX;
tx_pwr_diff = (char)(rtlphy->tx_power_by_rate_offset[band][path][tx_num] return (char)(rtlphy->tx_power_by_rate_offset[band][path][tx_num]
[rate] & [rate] &
0xff); 0xff);
return tx_pwr_diff;
} }
u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate, u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate,
...@@ -1844,7 +1840,6 @@ static long _rtl8822be_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw, ...@@ -1844,7 +1840,6 @@ static long _rtl8822be_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
u8 txpwridx) u8 txpwridx)
{ {
long offset; long offset;
long pwrout_dbm;
switch (wirelessmode) { switch (wirelessmode) {
case WIRELESS_MODE_B: case WIRELESS_MODE_B:
...@@ -1858,8 +1853,7 @@ static long _rtl8822be_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw, ...@@ -1858,8 +1853,7 @@ static long _rtl8822be_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
offset = -8; offset = -8;
break; break;
} }
pwrout_dbm = txpwridx / 2 + offset; return txpwridx / 2 + offset;
return pwrout_dbm;
} }
void rtl8822be_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation) void rtl8822be_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
...@@ -2218,6 +2212,5 @@ bool rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -2218,6 +2212,5 @@ bool rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw,
if (rfpwr_state == ppsc->rfpwr_state) if (rfpwr_state == ppsc->rfpwr_state)
return bresult; return bresult;
bresult = _rtl8822be_phy_set_rf_power_state(hw, rfpwr_state); return _rtl8822be_phy_set_rf_power_state(hw, rfpwr_state);
return bresult;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment