diff options
-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( | |||
1745 | int i; | 1745 | int i; |
1746 | u32 reg; | 1746 | u32 reg; |
1747 | 1747 | ||
1748 | if (!period_len) | ||
1749 | return NULL; | ||
1750 | |||
1748 | num_periods = buf_len / period_len; | 1751 | num_periods = buf_len / period_len; |
1749 | 1752 | ||
1753 | if (!num_periods) | ||
1754 | return NULL; | ||
1755 | |||
1750 | if (!is_slave_direction(direction)) | 1756 | if (!is_slave_direction(direction)) |
1751 | return NULL; | 1757 | return NULL; |
1752 | 1758 | ||