From: jsg Date: Thu, 24 Aug 2023 05:58:07 +0000 (+0000) Subject: drm/amdgpu: fix calltrace warning in amddrm_buddy_fini X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5711e8cd1658a41576184ff96d36e26cd1a00461;p=openbsd drm/amdgpu: fix calltrace warning in amddrm_buddy_fini From Longlong Yao ab6f446c220db0c131f2071846afd835799be0fb in linux-6.1.y/6.1.47 01382501509871d0799bab6bd412c228486af5bf in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c index 612c2cdde9b..61ef080ff32 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c @@ -514,6 +514,8 @@ static int psp_sw_fini(void *handle) kfree(cmd); cmd = NULL; + psp_free_shared_bufs(psp); + if (psp->km_ring.ring_mem) amdgpu_bo_free_kernel(&adev->firmware.rbuf, &psp->km_ring.ring_mem_mc_addr, @@ -2686,8 +2688,6 @@ static int psp_hw_fini(void *handle) psp_ring_destroy(psp, PSP_RING_TYPE__KM); - psp_free_shared_bufs(psp); - return 0; }