mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08:00
rtl8xxxu: fix uninitialized return value in ret
several functions are not initializing a return status in ret resulting in garbage to be returned instead of 0 for success. Currently, the calls to these functions are not checking the return, however, it seems prudent to return the correct status in case they are to be checked at a later date. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
e1d70c9b04
commit
37ba4b6265
@ -6370,7 +6370,7 @@ static void rtl8xxxu_set_ampdu_min_space(struct rtl8xxxu_priv *priv, u8 density)
|
||||
static int rtl8xxxu_active_to_emu(struct rtl8xxxu_priv *priv)
|
||||
{
|
||||
u8 val8;
|
||||
int count, ret;
|
||||
int count, ret = 0;
|
||||
|
||||
/* Start of rtl8723AU_card_enable_flow */
|
||||
/* Act to Cardemu sequence*/
|
||||
@ -6420,7 +6420,7 @@ static int rtl8723bu_active_to_emu(struct rtl8xxxu_priv *priv)
|
||||
u8 val8;
|
||||
u16 val16;
|
||||
u32 val32;
|
||||
int count, ret;
|
||||
int count, ret = 0;
|
||||
|
||||
/* Turn off RF */
|
||||
rtl8xxxu_write8(priv, REG_RF_CTRL, 0);
|
||||
@ -6477,7 +6477,7 @@ static int rtl8xxxu_active_to_lps(struct rtl8xxxu_priv *priv)
|
||||
{
|
||||
u8 val8;
|
||||
u8 val32;
|
||||
int count, ret;
|
||||
int count, ret = 0;
|
||||
|
||||
rtl8xxxu_write8(priv, REG_TXPAUSE, 0xff);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user