lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210720070040.20840-1-samirweng1979@163.com>
Date:   Tue, 20 Jul 2021 15:00:40 +0800
From:   samirweng1979 <samirweng1979@....com>
To:     Jes.Sorensen@...il.com, kvalo@...eaurora.org, davem@...emloft.net,
        kuba@...nel.org
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        wengjianfeng <wengjianfeng@...ong.com>
Subject: [PATCH] rtl8xxxu: remove unnecessary labels

From: wengjianfeng <wengjianfeng@...ong.com>

Simplify the code by removing unnecessary labels and returning directly.

Signed-off-by: wengjianfeng <wengjianfeng@...ong.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c
index 4f93f88..3fd14e6 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c
@@ -256,10 +256,8 @@ static int rtl8723a_emu_to_active(struct rtl8xxxu_priv *priv)
 		udelay(10);
 	}
 
-	if (!count) {
-		ret = -EBUSY;
-		goto exit;
-	}
+	if (!count)
+		return -EBUSY;
 
 	/* We should be able to optimize the following three entries into one */
 
@@ -292,10 +290,8 @@ static int rtl8723a_emu_to_active(struct rtl8xxxu_priv *priv)
 		udelay(10);
 	}
 
-	if (!count) {
-		ret = -EBUSY;
-		goto exit;
-	}
+	if (!count)
+		return -EBUSY;
 
 	/* 0x4C[23] = 0x4E[7] = 1, switch DPDT_SEL_P output from WL BB */
 	/*
@@ -307,7 +303,6 @@ static int rtl8723a_emu_to_active(struct rtl8xxxu_priv *priv)
 	val8 &= ~LEDCFG2_DPDT_SELECT;
 	rtl8xxxu_write8(priv, REG_LEDCFG2, val8);
 
-exit:
 	return ret;
 }
 
@@ -327,7 +322,7 @@ static int rtl8723au_power_on(struct rtl8xxxu_priv *priv)
 
 	ret = rtl8723a_emu_to_active(priv);
 	if (ret)
-		goto exit;
+		return ret;
 
 	/*
 	 * 0x0004[19] = 1, reset 8051
@@ -353,7 +348,7 @@ static int rtl8723au_power_on(struct rtl8xxxu_priv *priv)
 	val32 &= ~(BIT(28) | BIT(29) | BIT(30));
 	val32 |= (0x06 << 28);
 	rtl8xxxu_write32(priv, REG_EFUSE_CTRL, val32);
-exit:
+
 	return ret;
 }
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ