diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-17 20:54:48 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-17 20:54:48 +0200 |
commit | b9b11b133b4a0b4f8dc36ec04d81d630f763eaa6 (patch) | |
tree | 25551d4dcee70f34ada11745efbc2bff21de3840 /arch/sparc | |
parent | Merge tag 'pci-v5.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | sparc32: page align size in arch_dma_alloc (diff) | |
download | linux-b9b11b133b4a0b4f8dc36ec04d81d630f763eaa6.tar.xz linux-b9b11b133b4a0b4f8dc36ec04d81d630f763eaa6.zip |
Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fixes from Christoph Hellwig:
- page align size in sparc32 arch_dma_alloc (Andreas Larsson)
- tone down a new dma-debug message (Hamza Mahfooz)
- fix the kerneldoc for dma_map_sg_attrs (me)
* tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping:
sparc32: page align size in arch_dma_alloc
dma-debug: prevent an error message from causing runtime problems
dma-mapping: fix the kerneldoc for dma_map_sg_attrs
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 8e1d72a16759..7ceae24b0ca9 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -356,7 +356,9 @@ err_nomem: void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs) { - if (!sparc_dma_free_resource(cpu_addr, PAGE_ALIGN(size))) + size = PAGE_ALIGN(size); + + if (!sparc_dma_free_resource(cpu_addr, size)) return; dma_make_coherent(dma_addr, size); |