summaryrefslogtreecommitdiffstats
path: root/drivers/dma/pl330.c
diff options
context:
space:
mode:
authorDaniel Scally <dan.scally@ideasonboard.com>2024-01-18 12:29:59 +0100
committerVinod Koul <vkoul@kernel.org>2024-01-22 11:34:13 +0100
commit4728e3fe2ff1b02b84ddab876d8af5eeb74eee18 (patch)
tree77a3799aa593b4412cf6307d27412789845a18eb /drivers/dma/pl330.c
parentLinux 6.8-rc1 (diff)
downloadlinux-4728e3fe2ff1b02b84ddab876d8af5eeb74eee18.tar.xz
linux-4728e3fe2ff1b02b84ddab876d8af5eeb74eee18.zip
dmaengine: pl330: Clear callback_result for re-used descs
The pl330 driver re-uses DMA descriptors rather than reallocating them each time. At present, upon re-use the .callback member is cleared, but .callback result is not. This causes problems where a consuming driver sets the .callback_result for some submissions but not for others, as eventually the function is invoked erronously. Clear .callback_result along with .callback Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Link: https://lore.kernel.org/r/20240118112959.1027471-1-dan.scally@ideasonboard.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r--drivers/dma/pl330.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index c29744bfdf2c..5f6d7f1e095f 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2588,6 +2588,7 @@ static struct dma_pl330_desc *pluck_desc(struct list_head *pool,
desc->status = PREP;
desc->txd.callback = NULL;
+ desc->txd.callback_result = NULL;
}
spin_unlock_irqrestore(lock, flags);