lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 27 Sep 2016 23:07:54 -0400
From:   Matthew Kilgore <mattkilgore12@...il.com>
To:     gregkh@...uxfoundation.org, namrataashettar@...il.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
 drivers/staging/rtl8712/rtl8712_recv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
-- 
2.10.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ