diff mbox series

rtl8xxxu: assign value when defining variables

Message ID 20210129012019.11348-1-samirweng1979@163.com
State New
Headers show
Series rtl8xxxu: assign value when defining variables | expand

Commit Message

samirweng1979 Jan. 29, 2021, 1:20 a.m. UTC
From: wengjianfeng <wengjianfeng@yulong.com>

define ret and then assign value to it, which we should do one time.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
index 9f1f93d..b2ee168 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
@@ -1505,9 +1505,7 @@  static int rtl8192eu_power_on(struct rtl8xxxu_priv *priv)
 {
 	u16 val16;
 	u32 val32;
-	int ret;
-
-	ret = 0;
+	int ret = 0;
 
 	val32 = rtl8xxxu_read32(priv, REG_SYS_CFG);
 	if (val32 & SYS_CFG_SPS_LDO_SEL) {