1 From 0059c7ed6c11254f214a07357bbf87296cde446f Mon Sep 17 00:00:00 2001
2 From: Robin Gong <yibin.gong@nxp.com>
3 Date: Wed, 7 Nov 2018 22:19:07 +0800
4 Subject: [PATCH] MLK-20205-1: dmaengine: fsl-edma-v3: fix NULL pointer
7 Fix 'null pointer dereferences issue' reported by coverity(CID-1477441).
9 Signed-off-by: Robin Gong <yibin.gong@nxp.com>
10 Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
11 (cherry picked from commit 5343c0018af0af2eb3bb90c5a75e765b851a2c12)
13 drivers/dma/fsl-edma-v3.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
16 --- a/drivers/dma/fsl-edma-v3.c
17 +++ b/drivers/dma/fsl-edma-v3.c
18 @@ -419,7 +419,7 @@ static enum dma_status fsl_edma3_tx_stat
19 if (fsl_chan->edesc && cookie == fsl_chan->edesc->vdesc.tx.cookie)
20 txstate->residue = fsl_edma3_desc_residue(fsl_chan, vdesc,
23 + else if (fsl_chan->edesc && vdesc)
24 txstate->residue = fsl_edma3_desc_residue(fsl_chan, vdesc,