diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-24 09:28:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-24 09:28:55 -0700 |
commit | c2626876c24fe1f326381e3f1d48301bfc627d8e (patch) | |
tree | 1c43a7d4b7b8d72ab7a0b02095b74f1f9344b6ac | |
parent | ad5e427e0f6b702e52c11d1f7b2b7be3bac7de82 (diff) | |
parent | 06532750010e06dd4b6d69983773677df7fc5291 (diff) |
Merge tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping regression fix from Christoph Hellwig:
"Ensure that dma_addressing_limited doesn't crash on devices without a
dma mask (Eric Auger)"
* tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dma-mapping:
dma-mapping: use dma_get_mask in dma_addressing_limited
-rw-r--r-- | include/linux/dma-mapping.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index e11b115dd0e4..f7d1eea32c78 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -689,8 +689,8 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask) */ static inline bool dma_addressing_limited(struct device *dev) { - return min_not_zero(*dev->dma_mask, dev->bus_dma_mask) < - dma_get_required_mask(dev); + return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) < + dma_get_required_mask(dev); } #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS |