sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-17 07:36:55 +00:00
parent 454dab66ed
commit 27298272ec
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
237 changed files with 4666 additions and 2149 deletions

View file

@ -588,13 +588,12 @@ int dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage,
#else
nfences = kmalloc(count * sizeof(void *),
GFP_KERNEL);
if (nfences != NULL && *fences != NULL)
if (nfences != NULL && *fences != NULL) {
memcpy(nfences, *fences,
(count - 1) * sizeof(void *));
if (nfences) {
kfree(*fences);
new_fences = nfences;
}
new_fences = nfences;
#endif
if (count && !new_fences) {
kfree(*fences);