diff options
-rw-r--r-- | drivers/dma/xilinx/xilinx_vdma.c | 2 |
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, | |||
1236 | struct xilinx_vdma_device *xdev = ofdma->of_dma_data; | 1236 | struct xilinx_vdma_device *xdev = ofdma->of_dma_data; |
1237 | int chan_id = dma_spec->args[0]; | 1237 | int chan_id = dma_spec->args[0]; |
1238 | 1238 | ||
1239 | if (chan_id >= XILINX_VDMA_MAX_CHANS_PER_DEVICE) | 1239 | if (chan_id >= XILINX_VDMA_MAX_CHANS_PER_DEVICE || !xdev->chan[chan_id]) |
1240 | return NULL; | 1240 | return NULL; |
1241 | 1241 | ||
1242 | return dma_get_slave_channel(&xdev->chan[chan_id]->common); | 1242 | return dma_get_slave_channel(&xdev->chan[chan_id]->common); |