Searched hist:ee44d0b78839b21591501424fd3cb3648cc803b5 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/xilinx/ |
H A D | xilinx_axienet_main.c | diff ee44d0b78839b21591501424fd3cb3648cc803b5 Tue Mar 24 08:23:36 CDT 2020 Andre Przywara <andre.przywara@arm.com> net: axienet: Propagate failure of DMA descriptor setup
When we fail allocating the DMA buffers in axienet_dma_bd_init(), we report this error, but carry on with initialisation nevertheless.
This leads to a kernel panic when the driver later wants to send a packet, as it uses uninitialised data structures.
Make the axienet_device_reset() routine return an error value, as it contains the DMA buffer initialisation. Make sure we propagate the error up the chain and eventually fail the driver initialisation, to avoid relying on non-initialised buffers.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|