net: adaptec: starfire: add checks for dma mapping errors
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 27 Jan 2017 22:07:30 +0000 (01:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jun 2017 04:39:37 +0000 (06:39 +0200)
commit9343894a8b3d310ea580948835cc9e7ece537155
tree1f63967e622384e95fbd9c63f67a367955e6b5d3
parent3926d04ddec241a503ad121e48b943ac773255ff
net: adaptec: starfire: add checks for dma mapping errors

[ Upstream commit d1156b489fa734d1af763d6a07b1637c01bb0aed ]

init_ring(), refill_rx_ring() and start_tx() don't check
if mapping dma memory succeed.
The patch adds the checks and failure handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/adaptec/starfire.c