diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-21 15:33:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-22 16:14:31 -0700 |
commit | 23c2412d6296b4719c2c60054af00062174dd464 (patch) | |
tree | e6f456dfa775a5688eb5b6e8902c95d9c968c7fd | |
parent | 7d2fa71048b85c29a3265a6ed3fae3a568aae49e (diff) | |
download | linux-stable-23c2412d6296b4719c2c60054af00062174dd464.tar.gz linux-stable-23c2412d6296b4719c2c60054af00062174dd464.tar.bz2 linux-stable-23c2412d6296b4719c2c60054af00062174dd464.zip |
net: stmmac: fix type of entry variable
Variable can store negative values.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 925f2f8659b8..934143e1193b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1945,7 +1945,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); unsigned int txsize = priv->dma_tx_size; - unsigned int entry; + int entry; int i, csum_insertion = 0, is_jumbo = 0; int nfrags = skb_shinfo(skb)->nr_frags; struct dma_desc *desc, *first; |