mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
A fix for a fix that went in this merge window from Arnd.
-----BEGIN PGP SIGNATURE----- iQI/BAABCAApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAlnC3C8LHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYPNMQ//XcJyQHfMFgzlF6xsQ8GdrwtPr3BKO2jGNj+5DSZ6 qaLwmxaLTQ5rovITtV7b88LdxzeyS1z7THhKALZcS+gVTmV51FYHNnWI4U++EIzy BeupNm3irBmjiTrvrUwqirjVs99xMZPvbQrMW+iSa+FxoXJ7fqQwCqnUpKzDznQH h2LhvwYzl38UuUggQXmYGTJ8PrToOkaZ4jL26/fN9f6zxBz+M3AzbiqCxuMYDtrA Et8PaIoWd8TTUoLHL/Jk/SEtEHXYwXPFWiVrib3i4KkSlPPoEdQByGsVr9heCtRq D59P4hFQzFO7A3OOdHkG99Ts/4YfTs/aGXMatLJ16fHsrVY8Y0UH5TtJx0rD5V6H 713PSPwr+tpT0Vmn7KrYp8yv+UfeL2EI9Nl4vFoF/wjvV4hVp+4vyW2RjWWBjdYW ABr7ltVGpqZl7DXavMECJiN4PHeuBJJ5G+1ivyp336GBCsduvVRWtxxhH2VK08pG 88DT8iDBhtgTciwSqEYLmBQ/SFmOwVSm0SlZ0+amAtscnGREcioFEOIi9e3m08aD SGvWkGVXYtzC0D4NeYych1isf/Z1vnVxxR9ov80Diy4ejYt7IM0/GrSpbiUTuBzZ Hs7FfM5HOrjbkP5BQuVUUaEKqMC5dss4mL9YyLXm755imlXtjShk9q++MGmf5gvf g/Y= =hV0Y -----END PGP SIGNATURE----- Merge tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma mapping fix from Christoph Hellwig: "A fix for a fix that went in this merge window from Arnd" * tag 'dma-mapping-4.14-2' of git://git.infradead.org/users/hch/dma-mapping: dma-coherent: fix rmem_dma_device_init regression
This commit is contained in:
commit
20c29a9755
@ -348,16 +348,15 @@ static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
|
||||
struct dma_coherent_mem *mem = rmem->priv;
|
||||
int ret;
|
||||
|
||||
if (!mem)
|
||||
return -ENODEV;
|
||||
|
||||
ret = dma_init_coherent_memory(rmem->base, rmem->base, rmem->size,
|
||||
DMA_MEMORY_EXCLUSIVE, &mem);
|
||||
|
||||
if (ret) {
|
||||
pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
|
||||
&rmem->base, (unsigned long)rmem->size / SZ_1M);
|
||||
return ret;
|
||||
if (!mem) {
|
||||
ret = dma_init_coherent_memory(rmem->base, rmem->base,
|
||||
rmem->size,
|
||||
DMA_MEMORY_EXCLUSIVE, &mem);
|
||||
if (ret) {
|
||||
pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
|
||||
&rmem->base, (unsigned long)rmem->size / SZ_1M);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
mem->use_dev_dma_pfn_offset = true;
|
||||
rmem->priv = mem;
|
||||
|
Loading…
Reference in New Issue
Block a user