diff mbox

[07/11] dma: xilinx: vdma: Allow only one chunk in a line

Message ID 1412022477-28749-8-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State Superseded
Headers show

Commit Message

Laurent Pinchart Sept. 29, 2014, 8:27 p.m. UTC
From: Srikanth Thokala <srikanth.thokala@xilinx.com>

This patch adds a sanity check to see if frame_size is 1.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/dma/xilinx/xilinx_vdma.c | 3 +++
 1 file changed, 3 insertions(+)

Cc: dmaengine@vger.kernel.org
diff mbox

Patch

diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c
index 8e9f2a6..b3b8761 100644
--- a/drivers/dma/xilinx/xilinx_vdma.c
+++ b/drivers/dma/xilinx/xilinx_vdma.c
@@ -942,6 +942,9 @@  xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
 	if (!xt->numf || !xt->sgl[0].size)
 		return NULL;
 
+	if (xt->frame_size != 1)
+		return NULL;
+
 	/* Allocate a transaction descriptor. */
 	desc = xilinx_vdma_alloc_tx_descriptor(chan);
 	if (!desc)