dmaengine: dw-axi-dmac: ignore interrupt if no descriptor
authorBen Dooks <ben.dooks@sifive.com>
Fri, 8 Jul 2022 17:01:53 +0000 (18:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:37 +0000 (11:40 +0200)
commit54aa6c49361b79f7f6b15fc63dfe9ea52c70bb03
tree22899196ece371f1ae4108a1a97a00ee88413945
parentaf76e6fdcf92f1a742b788d0dba5edd194267bf9
dmaengine: dw-axi-dmac: ignore interrupt if no descriptor

[ Upstream commit 820f5ce999d2f99961e88c16d65cd26764df0590 ]

If the channel has no descriptor and the interrupt is raised then the
kernel will OOPS. Check the result of vchan_next_desc() in the handler
axi_chan_block_xfer_complete() to avoid the error happening.

Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
Link: https://lore.kernel.org/r/20220708170153.269991-4-ben.dooks@sifive.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c