linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: ath9k: simplify ar9003_hw_process_ini()
@ 2023-08-23 12:52 Dmitry Antipov
  2023-08-23 15:10 ` Jeff Johnson
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Antipov @ 2023-08-23 12:52 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: Kalle Valo, linux-wireless, lvc-project, Dmitry Antipov

Since commit 8896934c1684 ("ath9k_hw: remove direct accesses to channel
mode flags") changes 'ar9550_hw_get_modes_txgain_index()' so it never
returns -EINVAL, and 'ar9561_hw_get_modes_txgain_index()' never returns
negative value too, an extra check in 'ar9003_hw_process_ini()' may be
dropped.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath9k/ar9003_phy.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index a29c11f944a5..4731e6618209 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -925,9 +925,6 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
 			modes_txgain_index =
 				ar9561_hw_get_modes_txgain_index(ah, chan);
 
-		if (modes_txgain_index < 0)
-			return -EINVAL;
-
 		REG_WRITE_ARRAY(&ah->iniModesTxGain, modes_txgain_index,
 				regWrites);
 	} else {
-- 
2.41.0


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

end of thread, other threads:[~2023-09-20 13:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 12:52 [PATCH] wifi: ath9k: simplify ar9003_hw_process_ini() Dmitry Antipov
2023-08-23 15:10 ` Jeff Johnson
2023-08-23 18:23   ` [PATCH 1/2] " Dmitry Antipov
2023-08-23 18:23     ` [PATCH 2/2] wifi: ath9k: use u32 for txgain indexes Dmitry Antipov
2023-08-23 19:45       ` Jeff Johnson
2023-09-01 10:56       ` Toke Høiland-Jørgensen
2023-08-23 19:44     ` [PATCH 1/2] wifi: ath9k: simplify ar9003_hw_process_ini() Jeff Johnson
2023-09-01 10:56     ` Toke Høiland-Jørgensen
2023-09-20 13:16     ` 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).