Re: [PATCH] net: stmmac: fix a broken u32 less than zero check

From: David Miller
Date: Tue Jun 06 2017 - 16:27:28 EST


From: Colin King <colin.king@xxxxxxxxxxxxx>
Date: Tue, 6 Jun 2017 14:10:49 +0100

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

Applied, thanks Colin.