[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ab98889e7330e64656253f4e2a1d9462355045ed.1635773681.git.karolinadrobnik@gmail.com>
Date: Mon, 1 Nov 2021 14:32:05 +0000
From: Karolina Drobnik <karolinadrobnik@...il.com>
To: outreachy-kernel@...glegroups.com
Cc: gregkh@...uxfoundation.org, forest@...ttletooquiet.net,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Karolina Drobnik <karolinadrobnik@...il.com>,
Mike Rapoport <mike.rapoport@...il.com>
Subject: [PATCH v2 7/8] staging: vt6655: Delete bogus check for `init_count` in AL2230
Remove an unnecessary check in `rf_write_wake_prog_syn` in `RF_AL2230S`
switch case. This `if` conditional will never be true as `init_count` is
equal to 17 and can't be bigger than `MISCFIFO_SYNDATASIZE - 0`, which
is equal to 21.
Suggested-by: Mike Rapoport <mike.rapoport@...il.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@...il.com>
---
drivers/staging/vt6655/rf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index 1fe073c5fb6f..a150f1df3824 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -697,8 +697,6 @@ bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type,
/* Init Reg + Channel Reg (2) */
init_count = CB_AL2230_INIT_SEQ + 2;
sleep_count = 0;
- if (init_count > (MISCFIFO_SYNDATASIZE - sleep_count))
- return false;
for (i = 0; i < CB_AL2230_INIT_SEQ; i++)
MACvSetMISCFifo(priv, idx++, al2230_init_table[i]);
--
2.30.2
Powered by blists - more mailing lists