summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kilgore <mattkilgore12@gmail.com>2016-09-28 03:07:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-28 06:10:36 (GMT)
commit8681a1d47b3332b4dbeb0321b347af1bb7cb0cd6 (patch)
treecb75414f76b396759587741c1668b429f55b3229
parent1d0a2c5f2c53dc116e4e5dc9ef4661baf2f597ec (diff)
downloadlinux-8681a1d47b3332b4dbeb0321b347af1bb7cb0cd6.tar.xz
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. Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8712/rtl8712_recv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index cf46592..66f0e0a 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -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);