diff options
Diffstat (limited to 'drivers/dma/xilinx/xilinx_vdma.c')
-rw-r--r-- | drivers/dma/xilinx/xilinx_vdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index 0af0cf4b5f2e..914268bc9990 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c @@ -1745,8 +1745,14 @@ static struct dma_async_tx_descriptor *xilinx_dma_prep_dma_cyclic( int i; u32 reg; + if (!period_len) + return NULL; + num_periods = buf_len / period_len; + if (!num_periods) + return NULL; + if (!is_slave_direction(direction)) return NULL; |