summaryrefslogtreecommitdiffstats
path: root/kernel/dma
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
commit3a4516e9d4e52a1e1c49f9c269b6e702ef586047 (patch)
tree0e12fabd3a7d77e4d0bb956b670df8a1062abf7e /kernel/dma
parentReleasing progress-linux version 6.1.85-1progress7u1. (diff)
downloadlinux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.tar.xz
linux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.zip
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kernel/dma')
-rw-r--r--kernel/dma/direct.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 63859a101..d4215739e 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -296,7 +296,7 @@ void *dma_direct_alloc(struct device *dev, size_t size,
} else {
ret = page_address(page);
if (dma_set_decrypted(dev, ret, size))
- goto out_free_pages;
+ goto out_leak_pages;
}
memset(ret, 0, size);
@@ -317,6 +317,8 @@ out_encrypt_pages:
out_free_pages:
__dma_direct_free_pages(dev, page, size);
return NULL;
+out_leak_pages:
+ return NULL;
}
void dma_direct_free(struct device *dev, size_t size,
@@ -379,12 +381,11 @@ struct page *dma_direct_alloc_pages(struct device *dev, size_t size,
ret = page_address(page);
if (dma_set_decrypted(dev, ret, size))
- goto out_free_pages;
+ goto out_leak_pages;
memset(ret, 0, size);
*dma_handle = phys_to_dma_direct(dev, page_to_phys(page));
return page;
-out_free_pages:
- __dma_direct_free_pages(dev, page, size);
+out_leak_pages:
return NULL;
}