Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'")
PATCH 1/1 Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'")
An "unnecessary" 'else' was removed due to complains from checkpatch.pl as it is preceded by a 'return', however the 'else' branch is necessary as an earlier branch of the 'if' falls through. By removing the 'else', that route now hits the 'break' and the 'while' loop exits prematurely.
This commit reverts that change and puts the original 'else' back in place.
---drivers/staging/rtl8712/rtl8712_recv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8712/rtl8712_recv.c +0 -0
@@ -508,7 +508,8 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
plist = plist->next; else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num)) return false; - break; + else + break; } list_del_init(&(prframe->u.hdr.list)); list_add_tail(&(prframe->u.hdr.list), plist);
Signature · 1 line
2.10.0
Greg KH
maintainerQuoted 7 lines · Matthew Kilgore
An "unnecessary" 'else' was removed due to complains from checkpatch.pl as it is preceded by a 'return', however the 'else' branch is necessary as an earlier branch of the 'if' falls through. By removing the 'else', that route now hits the 'break' and the 'while' loop exits prematurely.
This commit reverts that change and puts the original 'else' back in place.
Ugh, good catch, sorry for missing this, my fault.
greg k-h