drivers/staging/rtl8723bs/core/rtw_recv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
checkpatch.pl flags an else clause following a branch that already
returns, in enqueue_reorder_recvframe(). Restructure the if/else-if/else
chain into sequential checks to remove the redundant else, with no
change in behavior.
Signed-off-by: ColtenOuO <jun930436@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 86c5e2c4e7dd..79bd56a5d6cd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1783,14 +1783,12 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
pnextrframe = (union recv_frame *)plist;
pnextattrib = &pnextrframe->u.hdr.attrib;
- if (SN_LESS(pnextattrib->seq_num, pattrib->seq_num))
- plist = get_next(plist);
- else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
+ if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
/* Duplicate entry is found!! Do not insert current entry. */
- /* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */
return false;
- else
+ if (!SN_LESS(pnextattrib->seq_num, pattrib->seq_num))
break;
+ plist = get_next(plist);
}
/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */
--
2.43.0
On Tue, Jul 21, 2026 at 04:02:32PM +0000, ColtenOuO wrote: > checkpatch.pl flags an else clause following a branch that already > returns, in enqueue_reorder_recvframe(). Restructure the if/else-if/else > chain into sequential checks to remove the redundant else, with no > change in behavior. > > Signed-off-by: ColtenOuO <jun930436@gmail.com> That's not the name you use to sign legal documents. But really, the original code is fine, just ignore tools when they are wrong. regards, dan carpenter
© 2016 - 2026 Red Hat, Inc.