aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/xilinx/xilinx_vdma.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-04-16 15:52:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-04-16 15:52:38 -0700
commit306a63bee192859ebd32c7328c7766636d882d8f (patch)
tree62d5344b0d7d2df6f0a629a2297fff9d0e264e02 /drivers/dma/xilinx/xilinx_vdma.c
parentac82a57aff853599db757f666204ac8d2af4b26b (diff)
parent956e6c8e18fa666ccc118c85fb32f92ebde3baf1 (diff)
downloadlinaro-android-306a63bee192859ebd32c7328c7766636d882d8f.tar.gz
Merge tag 'dmaengine-fix-4.6-rc4' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fixes from Vinod Koul: "This time we have some odd fixes in hsu, edma, omap and xilinx. Usual fixes and nothing special" * tag 'dmaengine-fix-4.6-rc4' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: dw: fix master selection dmaengine: edma: special case slot limit workaround dmaengine: edma: Remove dynamic TPTC power management feature dmaengine: vdma: don't crash when bad channel is requested dmaengine: omap-dma: Do not suppress interrupts for memcpy dmaengine: omap-dma: Fix polled channel completion detection and handling dmaengine: hsu: correct use of channel status register dmaengine: hsu: correct residue calculation of active descriptor dmaengine: hsu: set HSU_CH_MTSR to memory width
Diffstat (limited to 'drivers/dma/xilinx/xilinx_vdma.c')
-rw-r--r--drivers/dma/xilinx/xilinx_vdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c
index 0ee0321868d3..ef67f278e076 100644
--- a/drivers/dma/xilinx/xilinx_vdma.c
+++ b/drivers/dma/xilinx/xilinx_vdma.c
@@ -1236,7 +1236,7 @@ static struct dma_chan *of_dma_xilinx_xlate(struct of_phandle_args *dma_spec,
struct xilinx_vdma_device *xdev = ofdma->of_dma_data;
int chan_id = dma_spec->args[0];
- if (chan_id >= XILINX_VDMA_MAX_CHANS_PER_DEVICE)
+ if (chan_id >= XILINX_VDMA_MAX_CHANS_PER_DEVICE || !xdev->chan[chan_id])
return NULL;
return dma_get_slave_channel(&xdev->chan[chan_id]->common);