net: stmmac: fix a broken u32 less than zero check
authorColin Ian King <colin.king@canonical.com>
Tue, 6 Jun 2017 13:10:49 +0000 (14:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 20:26:28 +0000 (16:26 -0400)
commit1d3028f4c16487d63861ab6c68451768a7a109df
treefc7e5b6114f4684d2ce8bc5410a1b849ce37255b
parent426849e6611f2092553f8d53372ae310818a6292
net: stmmac: fix a broken u32 less than zero check

The check that queue is less or equal to zero is always true
because queue is a u32; queue is decremented and will wrap around
and never go -ve. Fix this by making queue an int.

Detected by CoverityScan, CID#1428988 ("Unsigned compared against 0")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c