dmaengine: sprd: Add validation of current descriptor in irq handler
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 6 May 2019 07:28:29 +0000 (15:28 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 21 May 2019 13:53:54 +0000 (19:23 +0530)
commit58152b0e573e5581c4b9ef7cf06d2e9fafae27d4
tree43e0a9a3f5abe71c40a6fc86b06239646e383f4c
parent16d0f85e45b99411ac10cb12cdd9279204a72381
dmaengine: sprd: Add validation of current descriptor in irq handler

When user terminates one DMA channel to free all its descriptors, but
at the same time one transaction interrupt was triggered possibly, now
we should not handle this interrupt by validating if the 'schan->cur_desc'
was set as NULL to avoid crashing the kernel.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sprd-dma.c