* [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check
@ 2020-04-18 3:20 Bernard Zhao
0 siblings, 0 replies; only message in thread
From: Bernard Zhao @ 2020-04-18 3:20 UTC (permalink / raw)
To: Felix Kuehling, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel, linux-kernel
Cc: opensource.kernel, Bernard Zhao
There is no need to if check again, maybe we could merge
into the above else branch.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 9dff792..327317c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -735,10 +735,8 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem,
false, &ctx->duplicates);
if (!ret)
ctx->reserved = true;
- else
+ else {
pr_err("Failed to reserve buffers in ttm.\n");
-
- if (ret) {
kfree(ctx->vm_pd);
ctx->vm_pd = NULL;
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-18 9:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 3:20 [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check Bernard Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).