net: bgmac: Fix infinite loop in bgmac_dma_tx_add()

[ Upstream commit e86663c475 ]

Nothing is decrementing the index "i" while we are cleaning up the
fragments we could not successful transmit.

Fixes: 9cde94506e ("bgmac: implement scatter/gather support")
Reported-by: coverity (CID 1352048)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Florian Fainelli 2016-07-15 15:42:52 -07:00 • committed by Greg Kroah-Hartman
commit 863c8bb8be