Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: Remove unneeded check in ks_wlan_get_range()
@ 2024-07-05 20:44 Aleksandr Mishin
  2024-07-05 21:15 ` Dan Carpenter
  2024-07-06 14:16 ` Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Aleksandr Mishin @ 2024-07-05 20:44 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Aleksandr Mishin, Greg Kroah-Hartman, Dan Carpenter,
	Zhang Shurong, linux-staging, linux-kernel, lvc-project

In ks_wlan_get_range() variable 'i' which value is always 12, is compared
to 2. This check is unneeded and should be removed.

Remove unneeded check to clean up the code.

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

Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
---
 drivers/staging/ks7010/ks_wlan_net.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 0fb97a79ad0b..d56dae73e7ed 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -972,10 +972,7 @@ static int ks_wlan_get_range(struct net_device *dev,
 	 * in bit/s that we can expect using this interface.
 	 * May be use for QoS stuff... Jean II
 	 */
-	if (i > 2)
-		range->throughput = 5000 * 1000;
-	else
-		range->throughput = 1500 * 1000;
+	range->throughput = 5000 * 1000;
 
 	range->min_rts = 0;
 	range->max_rts = 2347;
-- 
2.30.2


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

end of thread, other threads:[~2024-07-06 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 20:44 [PATCH] staging: ks7010: Remove unneeded check in ks_wlan_get_range() Aleksandr Mishin
2024-07-05 21:15 ` Dan Carpenter
2024-07-06 14:16 ` Wolfram Sang
2024-07-06 14:23   ` Philipp Hortmann
2024-07-06 14:34     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox