summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorChen Liangjun <b36089@freescale.com>2012-07-27 15:22:47 +0800
committerChen Liangjun <b36089@freescale.com>2012-07-27 15:52:44 +0800
commitbca640d1f725236ddc0443f9ce0f28bc1c5b4d78 (patch)
treeb00fec45e4cf2a498d710f4f2ce354a0a07b98dc /drivers/mxc
parentbb5a1cc0fc95f7bd6e721c94e4f39b3f389b7cf3 (diff)
ENGR00218624 ASRC: set dma_data to 0 before config SDMA
To allocate an SDMA channel, imx_dma_data struct is need. However, if the member dma_request_p2p is not set to 0 before configuration, SDMA driver would treat the channel as p2p(periphal to periphal) DMA and set SDMA channel context in p2p way. In the worst case, SDMA would access some unexisted address cause of mis configuration above and thus cause kernel panic or hang. In this patch, set imx_dma_data struct to 0 once it is allocated from stack. Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/asrc/mxc_asrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mxc/asrc/mxc_asrc.c b/drivers/mxc/asrc/mxc_asrc.c
index 4ef31c8fd6db..f67274fccf54 100644
--- a/drivers/mxc/asrc/mxc_asrc.c
+++ b/drivers/mxc/asrc/mxc_asrc.c
@@ -952,7 +952,7 @@ static bool filter(struct dma_chan *chan, void *param)
static struct dma_chan *imx_asrc_dma_alloc(u32 dma_req)
{
dma_cap_mask_t mask;
- struct imx_dma_data dma_data;
+ struct imx_dma_data dma_data = {0};
dma_data.peripheral_type = IMX_DMATYPE_ASRC;
dma_data.priority = DMA_PRIO_MEDIUM;