]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: fix a couple timeout loops
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Dec 2015 10:12:29 +0000 (13:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 17:43:01 +0000 (12:43 -0500)
commite16b2d1eccafb5534a40ba68f442dd5965df3ba8
tree5db9dc05cd2fc2dbbf17b1575bdaf01e73bc0094
parent8fa4ace275ab21bfcd295432649cf89e9344bf88
amd-xgbe: fix a couple timeout loops

At the end of the loop we test "if (!count)" but because "count--" is
a post-op then the loop will end with count set to -1.  I have fixed
this by changing it to --count.

Fixes: 0756e71c9ef1 ('amd-xgbe: Initial AMD 10GbE platform driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-dev.c