From: Matthew Kilgore Date: Wed, 28 Sep 2016 03:07:54 +0000 (-0400) Subject: Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'") X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8681a1d47b3332b4dbeb0321b347af1bb7cb0cd6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index cf46592be472..66f0e0a35167 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);