]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qlge: fix a timeout loop in ql_change_rx_buffers()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Dec 2015 10:52:36 +0000 (13:52 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 20:32:30 +0000 (12:32 -0800)
commitbee2e26c2211b3ce4457a8dd86c973d42a305639
tree3ced355fa59d278cc82f501ea242ffb48db9c444
parentb6789d2737276e616594542b1592355624ec6f46
qlge: fix a timeout loop in ql_change_rx_buffers()

The problem here is that after the loop we test for "if (!i) " but
because "i--" is a post-op we exit with i set to -1.  I have fixed this
by changing it to a pre-op instead.  I had to change the starting value
from 3 to 4 so that we still iterate 3 times.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 25605959
(cherry picked from commit 351434c6ba92e1fe7799a0c33c1412584a0fb3de)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/qlogic/qlge/qlge_main.c