提交 8b649223 编写于 作者: K Koul, Vinod 提交者: Dan Williams

intel_mid_dma: fix the WARN_ONs

Moved the WARN_ON to BUG_ON, as WARN_ON if hit,
can cause null pointer derefrences
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 576e3c39
......@@ -581,15 +581,15 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_memcpy(
enum intel_mid_dma_width width = 0;
pr_debug("MDMA: Prep for memcpy\n");
WARN_ON(!chan);
BUG_ON(!chan);
if (!len)
return NULL;
mids = chan->private;
WARN_ON(!mids);
BUG_ON(!mids);
midc = to_intel_mid_dma_chan(chan);
WARN_ON(!midc);
BUG_ON(!midc);
pr_debug("MDMA:called for DMA %x CH %d Length %zu\n",
midc->dma->pci_id, midc->ch_id, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册