diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-06 10:06:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-06 10:06:37 -0700 |
commit | 2692982b0800c6f6446e9edd4743239666e69f2e (patch) | |
tree | 28b683f9276f13c2612068f812dd9027a96f6ae8 /drivers/dma/qcom/bam_dma.c | |
parent | 4f8b49092c37cf0c87c43bb2698d43c71cf0e4e5 (diff) | |
parent | f6034225442c4a87906d36e975fd9e99a8f95487 (diff) | |
download | linux-stable-2692982b0800c6f6446e9edd4743239666e69f2e.tar.gz linux-stable-2692982b0800c6f6446e9edd4743239666e69f2e.tar.bz2 linux-stable-2692982b0800c6f6446e9edd4743239666e69f2e.zip |
Merge tag 'dmaengine-fix-5.2' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fixes from Vinod Koul:
- bam_dma fix for completed descriptor count
- fix for imx-sdma remove BD_INTR for channel0 and use-after-free on
probe error path
- endian bug fix in jz4780 IRQ handler
* tag 'dmaengine-fix-5.2' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: qcom: bam_dma: Fix completed descriptors count
dmaengine: imx-sdma: remove BD_INTR for channel0
dmaengine: imx-sdma: fix use-after-free on probe error path
dmaengine: jz4780: Fix an endian bug in IRQ handler
Diffstat (limited to 'drivers/dma/qcom/bam_dma.c')
-rw-r--r-- | drivers/dma/qcom/bam_dma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 4b43844f6af5..8e90a405939d 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -799,6 +799,9 @@ static u32 process_channel_irqs(struct bam_device *bdev) /* Number of bytes available to read */ avail = CIRC_CNT(offset, bchan->head, MAX_DESCRIPTORS + 1); + if (offset < bchan->head) + avail--; + list_for_each_entry_safe(async_desc, tmp, &bchan->desc_list, desc_node) { /* Not enough data to read */ |