]> git.baikalelectronics.ru Git - kernel.git/commit
net: axienet: Check for DMA mapping errors
authorAndre Przywara <andre.przywara@arm.com>
Tue, 24 Mar 2020 13:23:40 +0000 (13:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 23:33:04 +0000 (16:33 -0700)
commit02e28587f148fd009a33c11daf9c521954029693
treebf079aae1a3707d2cd2b95ffc9a5c76f878d3f3a
parentc080a546397c53ed88ff5f8612f450b14cab0024
net: axienet: Check for DMA mapping errors

Especially with the default 32-bit DMA mask, DMA buffers are a limited
resource, so their allocation can fail.
So as the DMA API documentation requires, add error checking code after
dma_map_single() calls to catch the case where we run out of "low" memory.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c