net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value
authorColin Ian King <colin.king@canonical.com>
Mon, 5 Jun 2017 09:04:52 +0000 (10:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 15:42:48 +0000 (07:42 -0800)
commit30037edd16f4b43eafdaf8bbfd5c00fb9666004f
tree9a2c0bc504cbf3977347c4ade5bf230711ddec3f
parent03a1d0be64ba74b50252e32944b42967d98d155a
net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value

[ Upstream commit 594238158bf748c285f0a73222cd9b7ccf3c525d ]

The current comparison of entry < 0 will never be true since entry is an
unsigned integer. Make entry an int to ensure -ve error return values
from the call to jumbo_frm are correctly being caught.

Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0")

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