artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f67d09
)
drm/amdgpu: fix potential resource leak warning
author
jsg
<jsg@openbsd.org>
Thu, 15 Aug 2024 02:51:35 +0000
(
02:51
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 15 Aug 2024 02:51:35 +0000
(
02:51
+0000)
From Tim Huang
bc93cfde69b7c786fcdc70463e153fdf633caff9
in linux-6.6.y/6.6.46
22a5daaec0660dd19740c4c6608b78f38760d1e6
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_sdma.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_sdma.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_sdma.c
index
349416e
..
1cf1498
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@
-102,6
+102,11
@@
static int amdgpu_vm_sdma_prepare(struct amdgpu_vm_update_params *p,
if (!r)
r = amdgpu_sync_push_to_job(&sync, p->job);
amdgpu_sync_free(&sync);
+
+ if (r) {
+ p->num_dw_left = 0;
+ amdgpu_job_free(p->job);
+ }
return r;
}