Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2ac90b9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8192u: fix a reversed test



Sean MacLennan fixed this in the rtl8192e driver and we should fix
it here as well.

It's pretty harmless.  This information comes from the firmware, if
we were to hit this bug we would read beyond the end of the array
once or twice before returning and update our statistics with bogus
data.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ea8a165
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ cmpk_message_handle_rx(
	      element type. Because FW may aggregate RX command packet to minimize
	      transmit time between DRV and FW.*/
	// Add a counter to prevent the lock in the loop from being held too long
	while (total_length > 0 || exe_cnt++ >100)
	while (total_length > 0 && exe_cnt++ < 100)
	{
		/* 2007/01/17 MH We support aggregation of different cmd in the same packet. */
		element_id = pcmd_buff[0];