linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] rtw89: Remove redundant check of ret after call to rtw89_mac_enable_bb_rf
@ 2021-10-15 15:21 Colin King
  2021-10-18  1:30 ` Pkshih
  2021-10-18 12:31 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-10-15 15:21 UTC (permalink / raw)
  To: Kalle Valo, David S . Miller, Jakub Kicinski, Ping-Ke Shih,
	linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/net/wireless/realtek/rtw89/mac.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 0171a5a7b1de..69384c43c046 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)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-18 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 15:21 [PATCH][next] rtw89: Remove redundant check of ret after call to rtw89_mac_enable_bb_rf Colin King
2021-10-18  1:30 ` Pkshih
2021-10-18 12:31 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).