Skip to contentSkip to conversation

staging: rtl8192e: remove unnecessary break

PATCH In review Perrin Smith 2 participants 2 messages Mar 2, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: remove unnecessary break

From: Perrin Smith <[email protected]>

removed unnecessary break at end of while loop

---
 drivers/staging/rtl8192e/rtllib_rx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/rtl8192e/rtllib_rx.c +0 -2
index b8ab34250e6a..2de6330b7737 100644
@@ -460,8 +460,6 @@ static bool AddReorderEntry(struct rx_ts_record *pTS,
 			((struct rx_reorder_entry *)list_entry(pList->next,
 			struct rx_reorder_entry, List))->SeqNum))
 			return false;
-		else
-			break;
 	}
 	pReorderEntry->List.next = pList->next;
 	pReorderEntry->List.next->prev = &pReorderEntry->List;
Signature · 1 line
2.26.2
#1 lore raw
Quoted 14 lines · Perrin Smith

From: Perrin Smith <[email protected]>

removed unnecessary break at end of while loop

---
 drivers/staging/rtl8192e/rtllib_rx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/rtl8192e/rtllib_rx.c +0 -0
index b8ab34250e6a..2de6330b7737 100644

drivers/staging/rtl8192e/rtllib_rx.c static bool AddReorderEntry(struct rx_ts_record *pTS, · line 464

Quoted 5 lines
drivers/staging/rtl8192e/rtllib_rx.c +0 -2
@@ -460,8 +460,6 @@ static bool AddReorderEntry(struct rx_ts_record *pTS,
 			((struct rx_reorder_entry *)list_entry(pList->next,
 			struct rx_reorder_entry, List))->SeqNum))
 			return false;
-		else
-			break;

No, this break is necessary. The patch introduces a bug. You need to be careful following checkpatch's advice because it's just a simple Perl script.

drivers/staging/rtl8192e/rtllib_rx.c static bool AddReorderEntry(struct rx_ts_record *pTS, · line 463

Quoted 1 line
drivers/staging/rtl8192e/rtllib_rx.c +0 -0
 	}

regards,
dan carpenter