Skip to content

Commit

Permalink
Merge tag 'dmaengine-fix-4.14-rc6' of git://git.infradead.org/users/v…
Browse files Browse the repository at this point in the history
…koul/slave-dma

Pull dmaengine fix from Vinod Koul:
 "Late fix for altera driver which fixes the locking in driver"

* tag 'dmaengine-fix-4.14-rc6' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: altera: Use IRQ-safe spinlock calls in the error paths as well
  • Loading branch information
Linus Torvalds committed Oct 21, 2017
2 parents 9c323bf + c5709d3 commit 0787643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/altera-msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ msgdma_prep_memcpy(struct dma_chan *dchan, dma_addr_t dma_dst,

spin_lock_irqsave(&mdev->lock, irqflags);
if (desc_cnt > mdev->desc_free_cnt) {
spin_unlock_bh(&mdev->lock);
spin_unlock_irqrestore(&mdev->lock, irqflags);
dev_dbg(mdev->dev, "mdev %p descs are not available\n", mdev);
return NULL;
}
Expand Down Expand Up @@ -407,7 +407,7 @@ msgdma_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,

spin_lock_irqsave(&mdev->lock, irqflags);
if (desc_cnt > mdev->desc_free_cnt) {
spin_unlock_bh(&mdev->lock);
spin_unlock_irqrestore(&mdev->lock, irqflags);
dev_dbg(mdev->dev, "mdev %p descs are not available\n", mdev);
return NULL;
}
Expand Down

0 comments on commit 0787643

Please sign in to comment.