diff mbox series

[I/Unstable/OEM-5.10/OEM-5.13/OEM-5.14,v2,2/5] rtw89: Remove redundant check of ret after call to rtw89_mac_enable_bb_rf

Message ID 20211025114414.1334615-4-kai.heng.feng@canonical.com
State Accepted
Headers show
Series Add support for Realtek 8852AE WiFi | expand

Commit Message

Kai-Heng Feng Oct. 25, 2021, 11:44 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1945967

The function rtw89_mac_enable_bb_rf is a void return type, so there is
no return error code to ret, so the following check for an error in ret
is redundant dead code and can be removed.

Addresses-Coverity: ("Logically dead code")
Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211015152113.33179-1-colin.king@canonical.com
(cherry picked from commit f7e7e440550b0b176df3d2ea3e76106bc89915d9 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/wireless/realtek/rtw89/mac.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 0171a5a7b1de0..69384c43c0461 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -2656,8 +2656,6 @@  int rtw89_mac_init(struct rtw89_dev *rtwdev)
 		goto fail;
 
 	rtw89_mac_enable_bb_rf(rtwdev);
-	if (ret)
-		goto fail;
 
 	ret = rtw89_mac_sys_init(rtwdev);
 	if (ret)